Commit graph

48 commits

Author SHA1 Message Date
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz d957f32690 Fixed a syntax error and removed unused imports.
- Legacy-Id: 16389
2019-07-04 20:48:55 +00:00
Henrik Levkowetz 97a555936d Changed a large number of test assertions to use assertContains() and removed separate, now unnecessary,status_code checks. Also changed many assertTrue(... in ...) to use assertIn().
- Legacy-Id: 16346
2019-06-30 21:03:34 +00:00
Henrik Levkowetz 15e74e89cb Converted instances of assertTrue(text in response.content) to the recommended assertContains(response, text), and similar for assertFalse(... in ...)
- Legacy-Id: 16336
2019-06-29 13:43:31 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 426870b766 Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz a2cafded25 Changed DocAlias to be many-to-many, in order to be able to handle STD aliases referring to multiple RFCs.
- Legacy-Id: 16249
2019-06-14 20:38:14 +00:00
Robert Sparks 340b6591b2 Use factories for ietf.doc.tests_status_change. Repair previous commit errors in ietf.doc.tests_material. Commit ready for merge.
- Legacy-Id: 15238
2018-06-09 22:16:26 +00:00
Henrik Levkowetz 98d234cd86 Refactored the handling of BallotDocEvent in tests, only creating them as needed, in preparation for stricter checks on state transitions to avoid mismatches between state and ballot.
- Legacy-Id: 14380
2017-11-30 16:02:31 +00:00
Henrik Levkowetz 14c748df98 Changed the creation of temporary test dirs to use names which include the test class name, in order to make it possible to run test cases in parallel. Disabled coverage testing when running in parallel (those classes cannot be pickled and distributed to the test runner threads, and also won't pass coverage data back). Tweaked the TestCase.tempdir() method.
- Legacy-Id: 13157
2017-03-27 21:41:18 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Henrik Levkowetz 4daf66d11c Added DocEvent rev= parameter througout the code.
- Legacy-Id: 12978
2017-03-06 15:08:21 +00:00
Henrik Levkowetz 5f053ad21a Cleaned up the remaining explicit url names, using dotted-paths to view
functions instead.  In all almost 700 changes.
 - Legacy-Id: 12923
2017-02-26 23:21:49 +00:00
Henrik Levkowetz 27351c4349 Fixed url lookups for doc.views_doc.document_main() to only use dotted-path, and removed the doc_view explicit url name. Fixes a 500 error in /submit/status/NNNN/.
- Legacy-Id: 12897
2017-02-22 11:40:55 +00:00
Henrik Levkowetz aa5e61d958 Updated all urlpatterns to use ietf.utils.urls.url() instead of django's,
in order to autogenerate dotted path url pattern names.  Updated a number
of url reverses to use dotted path, and removed explicit url pattern names
as needed.

Changed some imports to prevent import of ietf.urls before django
initialization was complete.


Changed 3 cases of form classes being curried to functions; django 1.10
didn't accept that.

Started converting old-style middleware classes to new-style middleware
functions (incomplete).

Tweaked a nomcom decorator to preserve function names and attributes, like
a good decorator should.

Replaced the removed django templatetag 'removetags' with our own version
which uses bleach, and does sanitizing in addition to removing explicitly
mentionied html tags.

Rewrote the filename argument handling in a management command which had
broken with the upgrade.
 - Legacy-Id: 12818
2017-02-11 14:43:01 +00:00
Henrik Levkowetz fd2304e446 In Django 1.9, CharField form fields will be whitespace-stripped by default. Added strip=False for the status change review form content. Also removed a superfluous f.close().
- Legacy-Id: 12677
2017-01-19 17:15:28 +00:00
Henrik Levkowetz 4b0a9360f0 Merged in ^/branch/iola/event-saving-refactor-r10291, which refactors document saving to always use doc.save_with_history(events), and requires accompanying events. This branch also provides refactoring of recurring regexes in url patterns into a dictionary. As part of the merge, also refactored new code which didn't use the save_with_history() method.
- Legacy-Id: 11840
2016-08-23 10:52:08 +00:00
Henrik Levkowetz e6a005dba6 Added a score of setting save/restores to test setup/teardown actions.
- Legacy-Id: 11436
2016-06-21 07:51:02 +00:00
Henrik Levkowetz cf7d794b09 Modified the test data to use some AD and WG chair names that contain non-ascii characters, and fixed test issues found.
- Legacy-Id: 10418
2015-11-04 07:34:56 +00:00
Ole Laursen 86c3a430d1 Merge in ^/branch/iola/event-saving-refactor-r10076, fixing a few problems
- Legacy-Id: 10298
2015-10-27 10:37:06 +00:00
Ole Laursen 6f044eea08 Summary: Move definition of document names and group acronyms to
settings.URL_REGEXPS, partly to cleanup the urls.py files, partly to
make sure that all URL patterns agree on what constitutes a name
 - Legacy-Id: 10114
2015-10-01 14:16:16 +00:00
Ole Laursen e1f0917659 Summary: Add new document saving API, Document.save_with_history(events).
The new API requires at least one event and will automatically save a
snapshot of the document and related state. Document.save() will now
throw an exception if called directly, as the new API is intended to
ensure that documents are saved with both an appropriate snapsnot and
relevant history log, both of which are easily defeated by just
calling .save() directly.

To simplify things, the snapshot is generated after the changes to a
document have been made (in anticipation of coming changes), instead
of before as was usual.

While revising the existing code to work with this API, a couple of
missing events was discovered:

- In draft expiry, a "Document has expired" event was only generated
  in case an IESG process had started on the document - now it's
  always generated, as the document changes its state in any case

- Synchronization updates like title and abstract amendmends from the
  RFC Editor were silently (except for RFC publication) applied and
  not accompanied by a descriptive event - they now are

- do_replace in the Secretariat tools now adds an event

- Proceedings post_process in the Secretariat tools now adds an event

- do_withdraw in the Secretariat tools now adds an event

A migration is needed for snapshotting all documents, takes a while to
run. It turns out that a single document had a bad foreign key so the
migration fixes that too.
 - Legacy-Id: 10101
2015-09-28 14:01:03 +00:00
Robert Sparks 8a74604a1b Done with the second pass focusing on test coverage. Lots of test tweaks, some new tests, a couple of bugs fixed. The session request code views need to be redone to allow testing.
- Legacy-Id: 10035
2015-08-21 16:39:00 +00:00
Robert Sparks 6c85bc558c checkpoint. Sets initial notify to empty
- Legacy-Id: 10009
2015-08-11 02:27:59 +00:00
Henrik Levkowetz bf9d668c3e Changed from using an otherwise unused css class as content container selector in tests, to instead using an explicit css id as selector.
- Legacy-Id: 9394
2015-04-04 08:57:39 +00:00
Henrik Levkowetz 625347cd2f Merged trunk@9354 to facelift copy
- Legacy-Id: 9357
2015-04-02 06:51:34 +00:00
Henrik Levkowetz 6f285a12f4 Changed the handling of some test directory creation and removal code, to be more consistent. Fixed a problem where a test didn't create and remove a test directory it used.
- Legacy-Id: 9203
2015-03-15 16:01:15 +00:00
Ole Laursen 460f1319a2 Fix problem in test of editing status change relations
- Legacy-Id: 8587
2014-11-05 12:42:23 +00:00
Ole Laursen 87870ca954 Fix more test errors - now only two not yet fully ported views remain
- Legacy-Id: 8571
2014-11-03 16:39:41 +00:00
Henrik Levkowetz d4e5f070af Merged in [8293] from rjsparks@nostrum.com:\n XXX: Should what is now captured in the list of STATUSCHANGE_RELATIONS instead be captured in the database in name_docrelationshipname?
Refactored editing the notify field to remove redundant code.
Changed the default notification list to include .all for documents, and the wg list for wg documents.
Allowed recalculating the notification list for all document types.
Improved the calculated notification list value for charters, conflict-reviews, and status-changes.
Adds shepherds to the notification list when they are assigned to a document.
Adds the working group email list to the notification list when a document is adopted.
Fixes #1438
 - Legacy-Id: 8385
Note: SVN reference [8293] has been migrated to Git commit 640c5eb52ace8bb6d2c1b3ca6c14ef10ad0f324f
2014-10-12 17:32:11 +00:00
Henrik Levkowetz ec3e247732 Merged in [8262] and [8263] from rjsparks@nostrum.com:
Changes when returning_item is automatically set to match the
    current IESGs preferences.  Removes several chunks of dead code
    related to editing telechat dates.  Improves returning item tests.

    Refactored multiple edit_telechat functions into one function in
    doc_views.  Added a helper function for determining if ballots have
    changed to isolate the implementation.  Fixed the issue with
    update_agenda setting the returning item bit even when the user
    explicitly said not to.  Added prompting to encourage proper setting
    of the returning item bit to the edit_telechat view.

    Fixes #1209
 - Legacy-Id: 8369
Note: SVN reference [8262] has been migrated to Git commit 9d8d0d63e2338d6fa81a82c553b8c6a1c3a105c1

Note: SVN reference [8263] has been migrated to Git commit 35a7436b782fc45e224ac9ea29bfb535fd3ce959
2014-09-28 19:57:01 +00:00
Robert Sparks 18bfe663d5 Corrected Document vs DocHistory mismatch when working with status-change documents. Corrected creation of BallotDocEvent timestamps. Fixes bug #1396. Commit ready for merge
- Legacy-Id: 7705
2014-05-06 20:32:27 +00:00
Henrik Levkowetz c19268f6a1 A second pass of pyflakes cleanup, removing additional bulk imports, fixing a bug in get_initial_notify(), and removing some dead (and buggy) code.
- Legacy-Id: 7509
2014-03-16 22:15:46 +00:00
Henrik Levkowetz 02031a01b9 Cleaned out some (arbitrary) submodule name imports into ietf.utils, and made the corresponding import statements import the names directly from the correct submodules.
- Legacy-Id: 7495
2014-03-16 07:09:38 +00:00
Henrik Levkowetz 5bef5d11ae Made doc/ pyflakes-clean.
- Legacy-Id: 7462
2014-03-15 16:09:47 +00:00
Robert Sparks 31808eccb2 Allow 1-3 digit RFCs in status change documents.
Fixes bug #1321
Commit ready for merge
 - Legacy-Id: 7292
2014-02-24 15:43:32 +00:00
Henrik Levkowetz 086c4290b7 Merged [6361] from rjsparks@nostrum.com:
Allow the secretariat and ads to change the title of a status change
document.  Fixes bug 1141.

Applied changes to adapt the code from Django 1.2 to 1.6: Provide a
quoted string to {% url %} and use request.user.person instead of
request.user.get_profile().
 - Legacy-Id: 7221
Note: SVN reference [6361] has been migrated to Git commit 7c4cf7002f
2014-02-09 18:46:19 +00:00
Henrik Levkowetz 690c36cd8a Merged [6359] from rjsparks@nostrum.com:
Send email to the secretariat when a status change document is put directly into the last-call-requested state.
Fixes bug 1139.
 - Legacy-Id: 7208
Note: SVN reference [6359] has been migrated to Git commit faabcb8328
2014-02-04 23:28:48 +00:00
Ole Laursen d1782297ab assertEquals -> assertEqual in tests, the former is deprecated
- Legacy-Id: 6964
2013-12-17 12:52:24 +00:00
Ole Laursen 8017c8eaf2 Fix a bunch of test errors, apparently the Textarea widget in Django
now outputs a newline in the beginning - this doesn't seem make a
difference for browsers, but it means testing with PyQuery needs to
strip the text to be able to check accurately
 - Legacy-Id: 6931
2013-12-16 11:47:32 +00:00
Ole Laursen 9457669310 Merge in changes from the old shimfree branch
- Legacy-Id: 6764
2013-11-27 12:55:50 +00:00
Robert Sparks 7c4cf7002f Allow the secretariat and ads to change the title of a status change document.
Fixes bug 1141
Commit ready to merge.
 - Legacy-Id: 6361
2013-10-03 22:36:57 +00:00
Robert Sparks faabcb8328 Send email to the secretariat when a status change document is put directly into the last-call-requested state.
Fixes bug 1139.

Commit ready for merge.
 - Legacy-Id: 6359
2013-10-03 21:58:42 +00:00
Henrik Levkowetz e4f4467725 Changed tests to use our own subclassed TestCase, and changed almost all fixtures to be perma_fixtures.
- Legacy-Id: 6320
2013-09-30 20:36:20 +00:00
Ole Laursen c191a691e0 Remove "names" fixture from all tests, since it's now loaded once just
after creating the test database through the global test fixture
mechanism - this speeds up multiple tests considerably
 - Legacy-Id: 6305
2013-09-29 17:35:59 +00:00
Robert Sparks a741642717 Added editing last call messages, requesting, issuing and tracking IETF LCs to status-change documents
Added a Cancel button to the form that allows editing the relations for status-change documents
Added instructions to the agenda section 3.3

This adds states to status-change- documents and has a migration that must be applied.

This fixes bug #1039
 - Legacy-Id: 5770
2013-06-01 21:01:45 +00:00
Robert Sparks 10b4f7a4dc * Added a document type for changing the publication status of other documents, and the UI for manipulating them.
* Added charters, conflict reviews, and status changes to the AD's "My Documents" page
* Improved the presentation of all document types on the Agenda, Future Telechats, Scribe and Moderator package pages
* Made the reverse name for document relationships explicit rather than deriving them from forward names
* Added a way to get to the underlying Document (when it exists) from an RfcWrapper
* Unified several common forms used by different document types
 - Legacy-Id: 5476
2013-03-01 15:47:51 +00:00
Robert Sparks 589ff698ee Merge forward complete
- Legacy-Id: 5328
2013-01-24 21:28:27 +00:00