Commit graph

37 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 a1e7dc9acc Changed a function name.
- Legacy-Id: 16386
2019-07-04 16:10:21 +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 df42be5d0c Converted a test to use .assertIn() instead of .assertTrue(... in ...) for better failure reports.
- Legacy-Id: 16016
2019-03-09 14:56:47 +00:00
Robert Sparks 67df7bd8cf Use factories for ietf.doc.tests_conflict_review. Commit ready for merge.
- Legacy-Id: 15227
2018-06-08 00:13:00 +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 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 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 79d373fa71 checkpoint.
- Legacy-Id: 10011
2015-08-11 21:52:28 +00:00
Robert Sparks 6c85bc558c checkpoint. Sets initial notify to empty
- Legacy-Id: 10009
2015-08-11 02:27:59 +00:00
Ole Laursen eccd8d27c4 Make new branch from trunk (r9007) and merge facelift-r8876 into it, fixing a few merge conflicts
- Legacy-Id: 9014
2015-02-06 14:08:34 +00:00
Henrik Levkowetz 58cc1e431f When draft email aliases are generated, the content of the doc.notify field is used to generate the .notify alias, and is also included in the .all alias. If the notify field contains either the .notify alias or the .all alias, this can create a mail loop. Changed the alias generation code to expand (or ignore, for .notify) aliases found in the notify field, and changed the code which fills in the notify field with a default value to insert the author, ad, and shepherd aliases instead of the .all alias.
- Legacy-Id: 8994
2015-02-05 15:38:01 +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
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
Henrik Levkowetz 295b484bea Merged [7210] from rjsparks@nostrum.com: Allow the IRTF Chair and the ISE to request a conflict review directly through the tracker.
Notify the Secretariat when someone other than the secretariat initiates a conflict review.
Notify IANA when anyone initiates a conflict review.
Fixes tickets #1287 and #1289
 - Legacy-Id: 7225
Note: SVN reference [7210] has been migrated to Git commit a0fd974c92
2014-02-09 21:01:29 +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
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
Henrik Levkowetz 2f3476690f In order that document states (which may be used by old documents) should not need to be removed when state machines change and states go out of use, all document states have a 'used' field. The code which accesses the state fields have not been requiring that used=True for the states returned, which is an error. Fixed this by adding 'used=True' to all State.objects.get() and State.objects.filter() call where it's relevant.
- Legacy-Id: 5486
2013-03-05 23:24:41 +00:00
Robert Sparks fb2b9c9e6c Removed some duplication between doc/util and doc/models by moving things into doc/models. Fixes bug #857
- Legacy-Id: 4750
2012-08-02 21:36:36 +00:00
Robert Sparks 8b5d95e71b Added the ability to reset the conflict review response text to the template at Sean's request
- Legacy-Id: 4549
2012-06-28 19:51:39 +00:00
Robert Sparks 51ab8123d9 merged in from 4.20-ise
- Legacy-Id: 4502
2012-06-22 20:25:17 +00:00