Commit graph

647 commits

Author SHA1 Message Date
Henrik Levkowetz 4f12513b1f Tweaked the affirm() failure message.
- Legacy-Id: 12925
2017-02-27 16:42:23 +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 9fb1a8e05f Tweaked an import to make Python 2to3 able to handle it.
- Legacy-Id: 12922
2017-02-26 10:54:33 +00:00
Henrik Levkowetz 84527c9df6 Added some code to utils.urls.url() to output remaining explicit url names together with the matching dotted-path to the view function.
- Legacy-Id: 12921
2017-02-25 20:32:20 +00:00
Henrik Levkowetz 49af9b4e1a Added an affirm(statement_string) function, which acts like an assert, and lets us trigger an email message with traceback when the statement to affirm is False. Use instead of assert if we still want the server to produce a response, even if something is seriously wrong.
- Legacy-Id: 12901
2017-02-23 11:48:55 +00:00
Henrik Levkowetz 988a2b808f Added explicit charset setting and consistent encoding to several email paths through the datatracker. After introducing support for non-ascii names in email addresses, using role.formatted_email() to insert names into email content doesn't work any more, since uncode names will now be rfc2047-encoded in formatted_email(). Added another method role.name_and_email() for this case. Replaced another case of '%s <%s>' name-and-email formatting with formataddr(). Fixed some tests which did not send unicode email bodies to the email functions. Fixes issue #2017.
- Legacy-Id: 12896
2017-02-21 19:17:10 +00:00
Henrik Levkowetz c889856dfa Added a validator to Document.title to prevent control chars in the title (complementing a recent cleanup of more than 120 instances of document titles containing vertical tabs)
- Legacy-Id: 12893
2017-02-20 20:47:37 +00:00
Henrik Levkowetz 858d855eff Changed the new account creation to require a proper name at the same time as the account password is set, before actually creating the account. Also tweaked the password strength and confirmation code.
- Legacy-Id: 12892
2017-02-20 16:50:39 +00:00
Henrik Levkowetz 8930d29a8e Merged in Django-1.10 upgrade work from ^/personal/henrik/6.43.1-django-1.10
- Legacy-Id: 12881
2017-02-19 18:18:00 +00:00
Henrik Levkowetz cf4a4b02a7 Reworked the email address handling in order to be able to support non-ascii names as part of email address fields. Reworked the generation of user names in the test suite to generate names from multiple non-ascii locales. Fixes issue #2080.
- Legacy-Id: 12872
2017-02-18 21:50:18 +00:00
Henrik Levkowetz c344a18bdf Fixed an issue with the test-crawler which could cause false positives for urls containing apostrophe.
- Legacy-Id: 12851
2017-02-16 09:58:34 +00:00
Ole Laursen d2e85a3aa3 Apply draft parser patch from Henrik to improve the patch on trunk to
combine paragraphs across page splits - this makes the country part of
the parser find more countries
 - Legacy-Id: 12848
2017-02-15 19:10:59 +00:00
Ole Laursen b2ff10b0f2 Add support for extracting the country line from the author addresses
to the draft parser (incorporating patch from trunk), store the
extracted country instead of trying to turn it into an ISO country
code, add country and continent name models and add initial data for
those, add helper function for cleaning the countries, add author
country and continent charts, move the affiliation models to
stats/models.py, fix a bunch of bugs.
 - Legacy-Id: 12846
2017-02-15 18:43:57 +00:00
Ole Laursen 882579bab3 Don't check url reverses on the form admin:blahblah for the time being
- Legacy-Id: 12845
2017-02-15 18:39:35 +00:00
Henrik Levkowetz 44ad914fba Tweaked the company name extraction code in class Draft.
- Legacy-Id: 12842
2017-02-15 14:09:54 +00:00
Henrik Levkowetz bb5e5b97ba Another tweak to handle page break paragraph joins better in class Draft.
- Legacy-Id: 12840
2017-02-14 17:41:30 +00:00
Henrik Levkowetz 6158221fa8 Tweaked the author extraction to recognize short lines as paragraph ends, not only lines ending in '.' or ':'
- Legacy-Id: 12837
2017-02-14 14:23:15 +00:00
Henrik Levkowetz 7f607c51d2 Changed from old-style to new-style middleware.
- Legacy-Id: 12824
2017-02-12 17:07:48 +00:00
Henrik Levkowetz a1606e8f7d Added a 'htmlfilters' tag library containing 'removetags'
- Legacy-Id: 12823
2017-02-12 17:05: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 19d585255a Django 1.10 does not permit the view argument to url() to be a string any more. Changed all cases view arguments to url() which were strings to instead reference the actual imported function.
- Legacy-Id: 12815
2017-02-10 14:49:16 +00:00
Henrik Levkowetz 49a899fe66 Added support for management of trac wikis for explicitly named groups, such as the IESG and IAOC. Tweaked the dummy-run handling of the create_group_wikis management command.
- Legacy-Id: 12789
2017-02-08 16:37:31 +00:00
Henrik Levkowetz de3976bec0 Merged in Django 1.9 upgrade work from ^/personal/henrik/6.41.1-django-1.9
- Legacy-Id: 12764
2017-01-31 15:13:01 +00:00
Henrik Levkowetz 55b430b525 Merged in [12748] from rcross@amsl.com:
Fixes #2172.  Add Requested Resources and People who must be there, to email notifications of session requests.
 - Legacy-Id: 12757
Note: SVN reference [12748] has been migrated to Git commit eeb35e997d
2017-01-30 23:22:45 +00:00
Henrik Levkowetz 40e8380751 Merged django 1.9 work forward to copy of trunk @6.41.0
- Legacy-Id: 12756
2017-01-30 23:13:02 +00:00
Ryan Cross eeb35e997d Fixes #2172. Add Requested Resources and People who must be there, to email notifications of session requests. Commit ready for merge.
- Legacy-Id: 12748
2017-01-27 23:32:52 +00:00
Ole Laursen 90051a1575 Add support for displaying and editing author affiliation and country
when submitting a draft, replace the Submission.authors line-based
text field with a JSON field
 - Legacy-Id: 12745
2017-01-27 16:10:31 +00:00
Ole Laursen 4426e3386f Add assertNoFormPostErrors for use instead of testing the status code
of form post responses to make it easier to see what goes wrong when
the form in a test suddently doesn't validate
 - Legacy-Id: 12744
2017-01-27 13:27:19 +00:00
Ole Laursen 9308948195 Add person, affiliation and country (through django-countries) to
DocumentAuthor, rename author field to email and make it optional (for
modeling old email-less submissions), remove the authors many to many
referencing field from Document as it is not really pointing the right
place.

Update the Secretariat tools to show affiliation and country.

Add migration for getting rid of the fake email addresses that the
migration script created some years ago (just set the author email
field to null).
 - Legacy-Id: 12739
2017-01-26 17:10:08 +00:00
Henrik Levkowetz 79c44d25ea Changed settings_sqlitetest so that local developer additions to context processors and middleware classes are avoided.
- Legacy-Id: 12723
2017-01-24 20:42:51 +00:00
Henrik Levkowetz 6f5c0fdd23 Added a trac-admin role name, for help in assigning trac-admin rights to trac instances. Extended the create_group_wikis management command to create and update wikis for groups of type 'team','ag' and 'dir', in addition to 'wg','rg' and 'area'; and also add people with role trac-admin in the group or in the secretariat to those given TRAC_ADMIN permissions in a Trac instance.
- Legacy-Id: 12721
2017-01-24 17:21:11 +00:00
Henrik Levkowetz a5d1aca525 Save database object before using it.
- Legacy-Id: 12716
2017-01-23 19:42:03 +00:00
Henrik Levkowetz 613f0c8233 Pyflakes fixes.
- Legacy-Id: 12714
2017-01-23 18:35:58 +00:00
Henrik Levkowetz bdbddc8efd Rewrote a test to provide on-disk files instead of StringIO files to argparse (it seems optparse could handle this, but argparse can't).
- Legacy-Id: 12713
2017-01-23 18:23:05 +00:00
Henrik Levkowetz 450c39af23 Changed the failure leeway of the code coverage test percentage from 0.005% back to 0.02%.
- Legacy-Id: 12707
2017-01-19 20:01:19 +00:00
Ole Laursen aebfe44f9e Add simple detection of formal languages used in draft, partially
based on the code in getauthors by Jari Arkko
 - Legacy-Id: 12657
2017-01-16 16:08:56 +00:00
Ole Laursen 34a9f36534 Add helper for getting word count from draft
- Legacy-Id: 12655
2017-01-16 11:35:48 +00:00
Henrik Levkowetz 6eec4c2648 Converted all management commands which set up additional command-line switches to use the argparse approach instead of the deprecated optparse approach.
- Legacy-Id: 12645
2017-01-11 18:42:38 +00:00
Henrik Levkowetz 7b95411f58 The context_instance parameter to render_to_response() and render_to_string() is now deprecated. Fixed this, and generally changed the idiom render_to_response('template.html', {}, RequestContext(request)) to the newer and simpler render(request, 'template.html', {}). About 200 instances.
- Legacy-Id: 12637
2017-01-09 21:26:30 +00:00
Henrik Levkowetz 9c095365dd Commented out debug output from ietf.utils.urls.url(). Tweaked the url() handling of django views.
- Legacy-Id: 12634
2017-01-09 16:32:38 +00:00
Henrik Levkowetz eb5aa9a691 Django 1.9: Refined the autonaming url() replacement.
- Legacy-Id: 12622
2016-12-22 18:08:21 +00:00
Henrik Levkowetz d5460b8f7f Django 1.9: Merged work forward to copy of latest release.
- Legacy-Id: 12621
2016-12-22 17:30:50 +00:00
Henrik Levkowetz bfc44dea82 Django 1.9: Added an alternative implementation of urls() which derives an url pattern name from the callable, in order to maintain DRY for url patterns.
- Legacy-Id: 12617
2016-12-22 17:20:29 +00:00
Henrik Levkowetz 3944ab95cc Django 1.9: Supplied a required argument to TemplateDoesNotExist()
- Legacy-Id: 12616
2016-12-22 17:14:51 +00:00
Henrik Levkowetz 471bbde4d5 Django 1.9: Adjusted import path
- Legacy-Id: 12615
2016-12-22 17:13:26 +00:00
Henrik Levkowetz ec0d6a7e4f Merged in [12593] from rjsparks@nostrum.com:
Send mail to team secretaries when a review is explicitly requested. Change the From and Subject for assignment emails to reviewers to make it clearer what the review is for and who assigned it. Fixes #2053 and #2114.
 - Legacy-Id: 12602
Note: SVN reference [12593] has been migrated to Git commit 10f4892eae
2016-12-21 18:01:00 +00:00
Henrik Levkowetz 7e6baf15b7 Merged in [12588] from rjsparks@nostrum.com:
Change how we display review text to follow the tecnique used with other large blocks of pasted or imported text (shepherds writeups for instance). Fixes #2104.
 - Legacy-Id: 12600
Note: SVN reference [12588] has been migrated to Git commit 7c182375af
2016-12-21 17:26:03 +00:00
Henrik Levkowetz 8e9858379b Fixed some pyflakes and form initialization issues with the upgrade to DurationField.
- Legacy-Id: 12599
2016-12-21 17:03:39 +00:00
Henrik Levkowetz 67b2fc1107 Extended the form fields used for duration to accept additional formats, including formats the secretariat are currently using, in order to avoid trouble with the TimedeltaField --> DurationField transition.
- Legacy-Id: 12598
2016-12-21 15:26:32 +00:00
Robert Sparks 10f4892eae Send mail to team secretaries when a review is explicitly requested. Change the From and Subject for assignment emails to reviewers to make it clearer what the review is for and who assigned it. Fixes #2053 and #2114. Commit ready for merge.
- Legacy-Id: 12593
2016-12-19 22:32:03 +00:00
Robert Sparks 7c182375af Change how we display review text to follow the tecnique used with other large blocks of pasted or imported text (shepherds writeups for instance). Fixes #2104. Commit ready for merge.
- Legacy-Id: 12588
2016-12-19 20:38:51 +00:00
Henrik Levkowetz 481a96c935 Changed the handling of skip tests and messages in order to show which tests will be skipped, and why, at the start of a test run.
- Legacy-Id: 12568
2016-12-17 21:49:53 +00:00
Henrik Levkowetz b14e981e66 Merged in [12520] from rjsparks@nostrum.com:
Slight refactor of the review models to capture review team settings. Allows configuring review teams to get automatic suggestions for reviews or not. Provides a better admin for creating/managing review teams. Fixes #2048 and #2072.
 - Legacy-Id: 12544
Note: SVN reference [12520] has been migrated to Git commit b24bdb5bc3
2016-12-15 20:55:40 +00:00
Henrik Levkowetz 65481b5df7 Moved warnings settings from manage.py and test_runner.py to one single place, settings.py. Decreased the verbosity level when invoking 'loaddata' from the test runner.
- Legacy-Id: 12535
2016-12-15 13:25:20 +00:00
Henrik Levkowetz 8e56935cfd Undid commit 12527, which contained much too much.
- Legacy-Id: 12528
2016-12-15 10:38:54 +00:00
Henrik Levkowetz e3c6e0ac6b Changed the state shown in all_id.txt for drafts which have entered IESG processing, but then been replaced, to show as 'Replaced' instead of 'In IESG Processing'. This is consistent with how they are shown in all_id2.txt.
- Legacy-Id: 12527
2016-12-15 10:36:15 +00:00
Robert Sparks b24bdb5bc3 Slight refactor of the review models to capture review team settings. Allows configuring review teams to get automatic suggestions for reviews or not. Provides a better admin for creating/managing review teams. Fixes #2048 and #2072. Commit ready for merge.
- Legacy-Id: 12520
2016-12-14 23:26:32 +00:00
Henrik Levkowetz 03d90163a5 Merged django-1.8 work forward to copy of 6.39.1
- Legacy-Id: 12504
2016-12-10 19:32:46 +00:00
Henrik Levkowetz 2978798f39 Made serialization work for RegexStringValidator
- Legacy-Id: 12492
2016-12-09 12:40:21 +00:00
Henrik Levkowetz 57eb5844e5 Merged in [12489] from rjsparks@nostrum.com:
Save a new reviewrequest for each team requested in the request form. Fixes #2094.
 - Legacy-Id: 12491
Note: SVN reference [12489] has been migrated to Git commit 4fff1ab101e4f7cd27dc8ded889e09905866076f
2016-12-09 12:01:48 +00:00
Henrik Levkowetz 2c27d5c611 Moved optional text wrapping before html escaping in markup_unicode(), used by get_unicode_document_content(). Fixes a problem with lines being wrapped when they should not be.
- Legacy-Id: 12480
2016-12-08 16:27:05 +00:00
Henrik Levkowetz 217b31f109 Made the RegexStringValidator deconstructible so we can generate migrations.
- Legacy-Id: 12476
2016-12-07 19:28:01 +00:00
Henrik Levkowetz 6304bfda69 Fixed template_coverage_collection initialisation. Tweaked a message. Updated coverage numbers.
- Legacy-Id: 12471
2016-12-07 11:33:33 +00:00
Henrik Levkowetz db7e554c5e Changed to using TestCase from ietf.utils, and turned off coverage checking when loading templates in TemplateChecksTestCase.
- Legacy-Id: 12470
2016-12-07 11:31:31 +00:00
Henrik Levkowetz b628a0844b Changed to using TestCase from ietf.utils in some places, for consistent test-suite failure output.
- Legacy-Id: 12467
2016-12-07 11:03:32 +00:00
Henrik Levkowetz 7dfbe51913 Don't count the template loading done in TemplateChecksTestCase towards template coverage numbers.
- Legacy-Id: 12464
2016-12-06 15:55:39 +00:00
Henrik Levkowetz e4ce339235 Merged in [12461] from rjsparks@nostrum.com:
Added migration to fetch text from reviews in the mail archives and populate the review documents. Fixes #2064.  Will patch into production.
 - Legacy-Id: 12463
Note: SVN reference [12461] has been migrated to Git commit 63a9599bafdcacf49f1bb374b2156d8473da93d1
2016-12-05 21:03:49 +00:00
Henrik Levkowetz 8f6e51839f Fixed some additional places to use the new settings.TEMPLATES structure.
- Legacy-Id: 12459
2016-12-05 19:04:27 +00:00
Henrik Levkowetz 14776bae70 Merged django18 work forward to r12447
- Legacy-Id: 12455
2016-12-05 15:03:40 +00:00
Henrik Levkowetz 0bb7854591 Merged django18 work forward to 6.39
- Legacy-Id: 12449
2016-12-05 14:01:25 +00:00
Henrik Levkowetz b897519fff Changed the test runner to use the verbosity set on the command line when loading fixtures.
- Legacy-Id: 12446
2016-12-05 12:56:53 +00:00
Henrik Levkowetz 5959b3a46a Added a validator for the reviewer settings' Filter Regexp field, to make sure that we don't later hit exceptions when trying to compile and use the regexp entered.
- Legacy-Id: 12439
2016-12-01 21:30:39 +00:00
Henrik Levkowetz b914f46313 Merged in ^/branch/iola/review-tracker-r12128@12397, bringing in the review tool functionality described in RFC7735. This adds the ability to set up review management pages for review teams such as genart, secdir, opsdir, etc.; letting the review team secretaries manage requested and completed reviews; letting the reviewers keep track of and document their reviews, and more. See the RFC for full specification, and the branch commit log for a full commit history.
- Legacy-Id: 12419
2016-11-29 14:54:19 +00:00
Henrik Levkowetz cec0f33817 Removed unused stuff.
- Legacy-Id: 12409
2016-11-28 21:20:28 +00:00
Henrik Levkowetz 53d68af9cd Adapted the utils template tests to the new template handling in Django 1.8.
- Legacy-Id: 12407
2016-11-28 21:05:17 +00:00
Henrik Levkowetz 554ec2d78c Removed an unused import
- Legacy-Id: 12406
2016-11-28 21:04:15 +00:00
Henrik Levkowetz 623ce0e1bd Merged in [12378] from rjsparks@nostrum.com:
Change the lines saying that a test has failed to make it easier to cut-paste to run the failed test again.
 - Legacy-Id: 12386
Note: SVN reference [12378] has been migrated to Git commit be51bc2e78
2016-11-18 10:45:40 +00:00
Robert Sparks be51bc2e78 Change the lines saying that a test has failed to make it easier to cut-paste to run the failed test again. Commit ready for merge.
- Legacy-Id: 12378
2016-11-17 02:52:45 +00:00
Henrik Levkowetz 964d34282f Added common patterns for template file names to ignore when testing template parsing and template test coverage.
- Legacy-Id: 12354
2016-11-16 02:14:32 +00:00
Henrik Levkowetz bb7d3b476f Tweaked the create_group_wiki management command and its test to show more information on failures.
- Legacy-Id: 12273
2016-11-07 17:13:09 +00:00
Henrik Levkowetz 888bd44a10 Stash the test results summary in ./.testresults instead of ./testresults, to avoid visual littering.
- Legacy-Id: 12272
2016-11-07 17:11:48 +00:00
Henrik Levkowetz 8d1aca19cc Rewrote the template coverage loader function to a proper template loader class.
- Legacy-Id: 12261
2016-11-03 20:51:06 +00:00
Henrik Levkowetz f7cf00b7ec Use get_or_create when creating test data, to avoid duplicate key warnings.
- Legacy-Id: 12259
2016-11-03 20:48:38 +00:00
Henrik Levkowetz 7b6407dfed Rewrote the test runner command-line switch declarations to use parser.add_argument() instead of the now unsupported option_list class attribute.
- Legacy-Id: 12251
2016-11-03 20:07:22 +00:00
Henrik Levkowetz 1d6853037e Updated the create_group_wikis management command with additional switches to make it easier to do test deployment of individual wikis.
- Legacy-Id: 12240
2016-10-30 18:10:41 +00:00
Henrik Levkowetz aec77c2385 Rewrote Document.href() to not do database queries when possible, as that has a big performance impact. Fixed a number of tests which relied on href() not doing the right thing for simplified test data. Added caching of canonical_name(), which can be quite heavy. Additional refactoring in a number of places, to use better test data and avoid test failures for good code :-)
- Legacy-Id: 12226
2016-10-28 16:59:42 +00:00
Henrik Levkowetz a1934d1713 Refined the sql debug view at the bottom of each page. Added a column showing the WHERE clause, as that is quite helpful in working out where a given query is coming from. Added an sql_debug template variable to make it easier to switch between the sql debug view and using the django-debug-toolbar.
- Legacy-Id: 12225
2016-10-28 16:46:05 +00:00
Henrik Levkowetz 681395ff8e Added a column to the debug view of sql queries which indicate whether a query originated in view code or template rendering.
- Legacy-Id: 12217
2016-10-26 18:49:58 +00:00
Henrik Levkowetz 27cd21155c Fixed a bug in testing for directory existence in the test setup.
- Legacy-Id: 12185
2016-10-19 22:38:28 +00:00
Henrik Levkowetz c22842a7c4 Made the wiki glue test skippable, in case the python subversion bindings are unavailable. Added creation of temporary directories also for the svn repositores created for wikis during testing.
- Legacy-Id: 12183
2016-10-19 21:14:20 +00:00
Henrik Levkowetz ba5c17ecfd Merged in a management command which provides glue code for creation and maintenance of Trac issue tracker and wiki installations per group. New groups of type wg, rg, and area will autmatically receive a Trac instance.
- Legacy-Id: 12182
2016-10-19 18:08:05 +00:00
Henrik Levkowetz f9b4955880 Tweaked the settings a bit, to avoid problems if changing TRAC_WIKI_DIR_ROOT after TRAC_WIKI_DIR_PATTERN has been set. Added a --wiki-dir-pattern switch to the management command.
- Legacy-Id: 12181
2016-10-19 14:56:57 +00:00
Henrik Levkowetz d400b88239 Added a test for the create_group_wikis management command.
- Legacy-Id: 12180
2016-10-19 14:53:58 +00:00
Henrik Levkowetz 41945d5525 Reverted unintended commit
- Legacy-Id: 12179
2016-10-19 14:47:17 +00:00
Henrik Levkowetz b2aae7dc35 Ignore the virtualenv-created directories under env/
- Legacy-Id: 12178
2016-10-19 14:44:44 +00:00
Henrik Levkowetz 887455c1d5 Make sure to not include draft name in the title extracted from draft text.
- Legacy-Id: 12176
2016-10-19 12:18:59 +00:00
Ole Laursen 4b987436c0 Fix a missing HttpResponseForbidden in review statistics, make the
review test code use a separate reviewer and reviewsecretary user to
avoid confounding things - also let these use Unicode in their names
to check for Unicode trouble.
 - Legacy-Id: 12175
2016-10-19 11:58:49 +00:00
Henrik Levkowetz f33eab6770 Install custom wiki pages before default pages, as we refuse to overwrite an existing page.
- Legacy-Id: 12174
2016-10-18 19:32:19 +00:00
Henrik Levkowetz 4cd3c484be New management command create_group_wikis. Work in progress.
- Legacy-Id: 12149
2016-10-14 15:03:13 +00:00
Ole Laursen 958ba5ba95 Make new branch from trunk and merge in review-tracker-r11921
- Legacy-Id: 12129
2016-10-13 16:38:47 +00:00
Henrik Levkowetz e7b76917ae Added a missing string format parmameter.
- Legacy-Id: 12116
2016-10-11 12:53:14 +00:00
Ole Laursen 227fdd7953 Add reviews to search results and IESG agenda. Support restricting
review types so that teams will only have those review types
listed and suggested that they are configured to have.

Fix a couple of things in the importer after having tested it on all
the databases. Set unavailable end date >= 2020 to indefinite.

Fix a couple of bugs.
 - Legacy-Id: 12095
2016-10-06 14:47:41 +00:00
Henrik Levkowetz a842e19452 Moved some code and tweaked settings to ignore sql debug functions when calculating code coverage.
- Legacy-Id: 12070
2016-09-30 21:30:04 +00:00
Henrik Levkowetz 3854c832a0 Change things so that the reorder_by setting has an effect on the test ordering. It didn't before, as CoverageTest was a subclass of the earlier entries in the reorder_by setting.
- Legacy-Id: 12039
2016-09-26 17:48:26 +00:00
Henrik Levkowetz 7f772641d4 Change the cache key construction to deal with query arguments containing spaces. Fixes 500 errors which would otherwise occur.
- Legacy-Id: 12035
2016-09-25 13:53:22 +00:00
Ole Laursen 99beb58291 Implement a round-robin rotation scheme for reviewers instead of
relying on when they last reviewed. In-order assignments automatically
move the rotation forwards while out-of-order assignments increment
the skip next of the assigned reviewer. Include rotation in open
review assignments email. Fix a couple of issues in the importer.
 - Legacy-Id: 12015
2016-09-21 16:52:50 +00:00
Ole Laursen 6da25e6bd9 Add personal review overview page for reviewers, add page for editing
reviewer availability settings, emailing the reviewer/secretary as
necessary, add tests for these pages. Fix a bunch of bugs.
 - Legacy-Id: 11998
2016-09-19 16:05:32 +00:00
Ole Laursen 0a8f3dbe02 Make it so that we don't have two persons with the same name in the
test data (prevents the duplicate warning email from being generated
on each test run)
 - Legacy-Id: 11997
2016-09-19 15:14:58 +00:00
Henrik Levkowetz ec684e1b4e Added a pylint rc-file, and fixed or silenced a number of issues found by pylint using the settings .pylintrc (which enable only error checking).
- Legacy-Id: 11941
2016-09-08 14:48:59 +00:00
Henrik Levkowetz 22e2b0ab88 Added a return value used by ietf.middleware.SMTPExceptionMiddleware.process_exception().
- Legacy-Id: 11940
2016-09-08 09:37:22 +00:00
Ole Laursen 74a02be9bf Create new branch from trunk@r11921, and merge review-tracker-r11360 into it
- Legacy-Id: 11923
2016-09-06 10:17:12 +00:00
Ole Laursen 1f7d4870a8 Refactor role handling in group editing slightly and add support for
editing reviewer roles in review teams. Also fix a couple of review
related bugs.
 - Legacy-Id: 11921
2016-09-05 12:33:54 +00:00
Ole Laursen 0958bcba4a Fill in the list_email attribute on the test review team
- Legacy-Id: 11845
2016-08-23 14:05:45 +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
Ole Laursen 426542771a Turn ReviewRequest.deadline into a date field with no time
- Legacy-Id: 11801
2016-08-17 15:10:39 +00:00
Henrik Levkowetz 523bfce86d Tweaked meetecho URLs, with new template string formatting filter.
- Legacy-Id: 11689
2016-07-16 17:15:21 +00:00
Henrik Levkowetz c7cecf66e9 Added a test case for group home.
- Legacy-Id: 11652
2016-07-13 19:20:13 +00:00
Henrik Levkowetz e3020686a8 Added a global declaration
- Legacy-Id: 11647
2016-07-13 16:00:41 +00:00
Henrik Levkowetz 0d160b9672 Guard get array value against array==None in log.getcaller()
- Legacy-Id: 11641
2016-07-13 12:56:02 +00:00
Henrik Levkowetz 402a099e4e Added a modified slugify function and template filter, which converts slashes to dashes instead of eliding them. This is necessary in order to be able to distinguish the slugified room names like 'Schinkel I/II' from 'Schinkel III'.
- Legacy-Id: 11589
2016-07-10 13:58:30 +00:00
Ole Laursen 19fff81a4f Rework closing a review request so the logic is reusable, add the more
specific close reasons to the database migration, add
ReviewRequest.requested_by so it's possible to notify the requester of
a review that it has been dropped.
 - Legacy-Id: 11520
2016-07-05 16:05:00 +00:00
Ole Laursen e2e66522c7 Add review request page for review teams and first draft of manage
review requests page.

Add importer for importing review data from the existing Perl tool
(WIP, gets most but not all of the interesting information out).

Fix various bugs.
 - Legacy-Id: 11508
2016-07-01 16:06:16 +00:00
Henrik Levkowetz f8804b4f2c Added 3 tests which checks 1) that all templates can be parsed and loaded, 2) that url template-tags refer to an urlconf callback that exists, and 3) that static template-tags resolve to urls that work. This was prompted by some 500 errors earlier which weren't caught by existing texts.
- Legacy-Id: 11483
2016-06-28 04:48:50 +00:00
Henrik Levkowetz a405449150 Cached the list of template paths in test_runner.py so we can call it multiple times cheaply.
- Legacy-Id: 11482
2016-06-28 04:44:25 +00:00
Henrik Levkowetz a36cf95572 Refactored the code to skip coverage testing a bit, and added skipping of template and url coverage.
- Legacy-Id: 11472
2016-06-24 15:39:59 +00:00
Henrik Levkowetz 64070fa3bf Added the ability to list absolute coverage data, not only show relative differences, to the coverage_changes management command.
- Legacy-Id: 11460
2016-06-22 22:05:50 +00:00
Henrik Levkowetz 6fa181763b Changed the code test coverage checking to never register coverage counts for tests that are sometimes skipped. Removed now unwanted skip settings from the releasetest settings.
- Legacy-Id: 11453
2016-06-21 20:39:28 +00:00
Henrik Levkowetz f083e88592 Made interim meeting test data use zero-padded sequence numbers.
- Legacy-Id: 11424
2016-06-20 18:52:09 +00:00
Henrik Levkowetz df84098980 Fixed a bug in find-history-replacement-active-at() where multiple history entries with the same timestamp would be unordered. This led to the wrong historic group info being shown in some cases (e.g., meeting/86/agenda would show dmmnew instead of dmm, leading to wrong agenda links)
- Legacy-Id: 11410
2016-06-19 12:52:36 +00:00
Henrik Levkowetz d298785fda Merged in ^/branch/amsl/interim@11230, which provides interim meeting management support. Also fixes issues #1961, #1962 and #1964.
- Legacy-Id: 11402
2016-06-17 14:16:27 +00:00
Ole Laursen 7b95f46ecb Merge review-tracker branch with new branch from trunk
- Legacy-Id: 11364
2016-06-14 13:57:20 +00:00
Ole Laursen 7cbe36fb62 Implement completing a review with tests. One can currently
enter/upload content or retrieve it from an IETF mailarch archive
through integrated searching support. Support for partial completion.
 - Legacy-Id: 11360
2016-06-14 11:28:53 +00:00
Ole Laursen b790781de9 Add return statements to remaining email sending function so it's
possibly to get the message back. We need the message and its
Message-ID in the review tracking code, to be able to link to it in
the mail archive.
 - Legacy-Id: 11359
2016-06-14 09:54:37 +00:00
Henrik Levkowetz 9eacdbf2c6 Merged in ^/personal/henrik/6.21.1-biophoto@11313, with work from rjsparks@nostrum.com and henrik@levkowetz.com which provides support for profile biography and photo.
- Legacy-Id: 11314
2016-06-10 19:36:47 +00:00
Henrik Levkowetz 14a4ea177c Merged in ^/personal/rjs/6.21.1.dev0@11257
- Legacy-Id: 11259
2016-06-01 16:37:01 +00:00
Henrik Levkowetz a32b121efb Changed some instances of error strings from ascii to unicode in order to avoid problems with unicode error messages, such as the file size indications generated by django.template.defaultfilters.filesizeformat().
- Legacy-Id: 11220
2016-05-22 14:40:37 +00:00
Ole Laursen 44e135345c Add a page for displaying a review request, add support for
withdrawing requests, add tests for these two pages
 - Legacy-Id: 11217
2016-05-20 14:14:31 +00:00
Ole Laursen 54c4c5efc5 Make the test data new revision event a proper NewRevisionDocEvent so
it's consistent with what the code expects
 - Legacy-Id: 11205
2016-05-19 15:33:02 +00:00
Henrik Levkowetz 02773059f2 Better usage help for the coverage_changes management command.
- Legacy-Id: 11193
2016-05-15 15:01:50 +00:00
Ole Laursen b599dca51d Override the django-bootstrap3 default help-text-and-errors rendering
to separate the unrelated concepts
 - Legacy-Id: 11177
2016-05-10 16:44:45 +00:00
Ryan Cross facead5d95 Add inteirm meeting request disapprove and cancel capabilities
- Legacy-Id: 11135
2016-04-26 23:05:53 +00:00
Ryan Cross be6e536769 add pending and detail views and tests.
- Legacy-Id: 11125
2016-04-20 23:57:52 +00:00
Henrik Levkowetz d96f0fe964 Added a django management command to populate yang model libraries from RFCs and drafts.
- Legacy-Id: 11110
2016-04-08 17:18:54 +00:00
Henrik Levkowetz adb8625635 Introduced caching for the api resources.
- Legacy-Id: 10929
2016-03-15 23:12:04 +00:00
Henrik Levkowetz 846a02c3f9 Fixed pyflakes complaints introduced with pyflakes 1.1.0
- Legacy-Id: 10896
2016-03-04 21:24:26 +00:00
Henrik Levkowetz 76bb233b70 Refactored draft submission checks so that new checkers can be slotted in through a configuration in settings.py. Refactored the calling of idnits to use the new API, and added a pyang validation check.
- Legacy-Id: 10894
2016-03-04 20:08:29 +00:00
Henrik Levkowetz 15460b3cff Merged in [10718] from olau@iola.dk:
Set daemon = True on the thread in the SMTP test server running while
running tests. This fixes the annoying problem of the python process
staying alive after certain bugs in the test invocation or after a
plain Ctrl + c.
 - Legacy-Id: 10859
Note: SVN reference [10718] has been migrated to Git commit d67a96b4f0
2016-02-25 20:04:57 +00:00
Henrik Levkowetz b19aae788e Tweaked the output of the check_referential_integrity script to specify the through table name for m2m relationships.
- Legacy-Id: 10838
2016-02-12 13:50:57 +00:00
Henrik Levkowetz c9136286be Merged in [10809] from rjsparks@nostrum.com:
Further tweaks to rendering messages from the messaging framework.
 - Legacy-Id: 10817
Note: SVN reference [10809] has been migrated to Git commit 214b81991e
2016-02-10 17:54:59 +00:00
Henrik Levkowetz 7e1a9c288a Merged in [10804] from rjsparks@nostrum.com:
Some tweaks to handle rendering django messaging framework messages a little better.
 - Legacy-Id: 10813
Note: SVN reference [10804] has been migrated to Git commit c3e81c179b
2016-02-10 17:12:59 +00:00
Robert Sparks 214b81991e Further tweaks to rendering messages from the messaging framework. Commit ready for merge.
- Legacy-Id: 10809
2016-02-09 19:56:26 +00:00
Robert Sparks c3e81c179b Some tweaks to handle rendering django messaging framework messages a little better. Commit ready to merge.
- Legacy-Id: 10804
2016-02-08 22:09:50 +00:00
Henrik Levkowetz 2c2ac888d0 Updated the API tests to avoid deprecation warnings from a new version of Tastypie (0.13.1).
- Legacy-Id: 10796
2016-02-07 15:33:40 +00:00
Robert Sparks 757397330c Addresses issues uncovered by the test-crawler. Adds missing DocAlias records for several document types. Creates DocAlias objects when createing Document objects for those document types. Identifies places in code to touch when we are ready to expose the bluesheets and recording document types at /doc/. (The data rows and the content store need work before doing so).
- Legacy-Id: 10731
2016-01-25 19:40:35 +00:00
Henrik Levkowetz d3c5609cde Added some tests for the group role email utility functions used by the alias generation scripts. Tempted to start using factory boy, but will wait till Robert's work in the nomcom branch comes in.
- Legacy-Id: 10544
2015-12-04 23:10:01 +00:00
Henrik Levkowetz f5ca3a12bc Fixed a bug in the header/footer stripping done before abstract extraction when a draft is submitted.
- Legacy-Id: 10519
2015-11-24 20:01:31 +00:00
Henrik Levkowetz 09e3f4e96d Added a management command to check referential integrity, original code
conceived and written by rjsparks@nostrum.com, with some additions and
adaptation as a management command by henrik@levkowetz.com.

This integrity checker, when run on the IETF database in November 2015,
seemed to have a factor on the order of 100 better speed and lower memory
consumption than the code in
https://stackoverflow.com/questions/4734645/is-there-a-tool-to-check-database-integrity-in-django

No exact figure is available, as the latter had to be killed when it had
taken all available ram (~14G) on the development machine, and started to
cause heavy swapping.
 - Legacy-Id: 10508
2015-11-19 21:40:37 +00:00
Henrik Levkowetz cc84668862 Updated utils resources.py
- Legacy-Id: 10489
2015-11-14 23:47:02 +00:00
Henrik Levkowetz 1759f1b38e Updated utils/resources.py to include an endpoint for the new DumpInfo table.
- Legacy-Id: 10488
2015-11-14 23:41:25 +00:00
Henrik Levkowetz 29b30c6c3c Added a utility model to hold information on when a given database dump has been done.
- Legacy-Id: 10480
2015-11-14 22:59:14 +00:00
Henrik Levkowetz 2191ec3cbd Removed logging through ietf.utils.log.log when running tests -- should shave another 15% off the test suite run time.
- Legacy-Id: 10454
2015-11-08 14:26:41 +00:00
Henrik Levkowetz fdc7dea3df Merged in [10097] from olau@iola.dk, in order to speed up the test suite.
- Legacy-Id: 10453
Note: SVN reference [10097] has been migrated to Git commit 99a9cb5569
2015-11-08 14:24:19 +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
Henrik Levkowetz f1a08564d1 Added a new machine-readable list of IPR declarations per draft, which also searches through related documents. Extended make_test_data() with a replaced document for the test draft.
- Legacy-Id: 10272
2015-10-23 16:34:44 +00:00
Henrik Levkowetz bfa222b782 Added a switch to the 'test' command, to write short test results to file, changing the default which used to be to always write these.
- Legacy-Id: 10270
2015-10-22 20:37:03 +00:00
Henrik Levkowetz c17ea94b08 Updated the code to use version 4.0.1 of coverage.py for code coverage measurements. Moved the code which starts coverage measurement to settings_sqlitetest.py to avoid coverage measurements running when not doing tests. Did some additional coveage measurement refactoring.
- Legacy-Id: 10238
2015-10-18 20:01:57 +00:00
Henrik Levkowetz 90b97468a9 Changed to use a gzipped release coverage JSON file, instead of a plain JSON file, if the name given in settings.py ends in .gz. Reduces the current release coverage file size from ~1.6MB to ~200kB. This is a preparation for saving more information in the release coverage file than we currently do.
- Legacy-Id: 10235
2015-10-18 14:32:36 +00:00
Henrik Levkowetz 499a2180a3 Removed unused imports.
- Legacy-Id: 10231
2015-10-18 12:29:17 +00:00
Henrik Levkowetz cf4cbf76f3 Reverted mixed merge.
- Legacy-Id: 10230
2015-10-18 12:14:30 +00:00
Henrik Levkowetz 349b2b511a Removed unused imports.
- Legacy-Id: 10229
2015-10-18 12:12:50 +00:00
Henrik Levkowetz 4a80395a63 Removed support for perma_fixtures, using the blobal test fixtures instead.
- Legacy-Id: 10228
2015-10-18 11:49:15 +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
Ole Laursen 99a9cb5569 Summary: Switch to a much faster password hasher when running unit
tests, the default, more secure one took ~20% of the test time
 - Legacy-Id: 10097
2015-09-23 09:49:48 +00:00
Henrik Levkowetz fb66c1856f Merged in [9669] from olau@iola.dk:
Summary: Make the meeting agenda code use the historic info available
for groups. In the process, added some select_related/prefetch_related
code to cut the number of database queries in the agenda down from
4000-5000 to about 50. Rewritten agenda CSV code to use Python arrays
rather than a template for improved readability/reuse. Rewritten week
view to assemble its data in Python. Plus a few other minor cleanups,
e.g. lame_description is now gone.
Fixes #1088. Branch
 - Legacy-Id: 10005
Note: SVN reference [9669] has been migrated to Git commit acda84208d
2015-08-10 19:46:11 +00:00
Henrik Levkowetz 2fe8dcb4c2 Added a very simple html version of the json API, to make it easier to explore the api manually.
- Legacy-Id: 9991
2015-08-09 16:28:55 +00:00
Henrik Levkowetz 6de3974be7 Misc stuff.
- Legacy-Id: 9954
2015-08-01 15:07:49 +00:00
Henrik Levkowetz a23846c8be Changed the storage format for code coverage in *coverage.json, in order to be able to calculate code coverage percentages for a subset of tested files.
- Legacy-Id: 9953
2015-08-01 15:07:21 +00:00
Henrik Levkowetz 7a059c908a Cleaned up bower_storage a bit.
- Legacy-Id: 9952
2015-08-01 15:03:40 +00:00
Henrik Levkowetz 9cec8a0587 Added code to the test_runner to force SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE to True during testing, to avoid triggering the system checks error which doesn't find the CDN symlink expected when serving static files via CDN.
- Legacy-Id: 9910
2015-07-28 11:02:00 +00:00
Henrik Levkowetz 6468a43840 Moved and renamed the file and class for the storage helper which lets us find static files managed by bower, to better reflect the function.
- Legacy-Id: 9909
2015-07-28 10:40:26 +00:00
Adam Roach 5cb7c82e39 Check that email is sent to chairs of both replaced and replacing document
- Legacy-Id: 9808
2015-07-18 16:07:26 +00:00
Ole Laursen acda84208d Summary: Make the meeting agenda code use the historic info available
for groups. In the process, added some select_related/prefetch_related
code to cut the number of database queries in the agenda down from
4000-5000 to about 50. Rewritten agenda CSV code to use Python arrays
rather than a template for improved readability/reuse. Rewritten week
view to assemble its data in Python. Plus a few other minor cleanups,
e.g. lame_description is now gone.

Fixes #1088. Branch ready for merge.
 - Legacy-Id: 9669
2015-06-17 13:37:16 +00:00
Robert Sparks 85cfe0ed8a Show leadership when and where mail was sent at the time it is sent. Commit ready for merge.
- Legacy-Id: 9608
2015-05-07 16:29:17 +00:00
Henrik Levkowetz e3799dca2e Fixed a bug in TestCase.assertValidHtml().
- Legacy-Id: 9563
2015-04-26 20:10:48 +00:00
Henrik Levkowetz 5a5289d1ad Added pip and setuptools, required in virtualenv, to requirements.txt in order to simplify buildbot testing of package installation and version testing.
- Legacy-Id: 9560
2015-04-26 19:12:16 +00:00
Henrik Levkowetz 09f3f51c77 Added support for an 'origin' template tag which will insert the name of the template file (within a html comment) into the page content when TEMPLATE_DEBUG is True; with the purpose of more easily being able to identify the templates from which page content comes.
- Legacy-Id: 9550
2015-04-24 20:38:36 +00:00
Henrik Levkowetz 6055215ab2 Removed local copy of html5lib, added html5lib to requirements.txt, and updated utils/html.py to work with htm5lib 0.999.
- Legacy-Id: 9547
2015-04-24 18:07:26 +00:00
Henrik Levkowetz 02cd366ff0 Merged in trunk@9440, containing the changes for version 5.13.1; and updated tests which look at HTML content to work with the facelift changes.
- Legacy-Id: 9446
2015-04-11 18:24:20 +00:00
Henrik Levkowetz 625347cd2f Merged trunk@9354 to facelift copy
- Legacy-Id: 9357
2015-04-02 06:51:34 +00:00
Robert Sparks a6c64d2b12 Remove sessonly, replacing the idea with a separate State. Add tests checking how materials show on agenda views. Commit ready for merge.
- Legacy-Id: 9351
2015-04-01 16:00:05 +00:00
Ryan Cross 34a16483fa Improve test coverage of secr.drafts. Commit ready for merge.
- Legacy-Id: 9307
2015-03-21 20:26:53 +00:00
buildbot 70396be450 Updated test
- Legacy-Id: 9241
2015-03-17 17:38:15 +00:00
buildbot cedb115038 Added exception capture and error message when the --release switch to coverage_changes specify a release for which there aren't any data. Also tweaked the diff output for code coverage changes.
- Legacy-Id: 9239
2015-03-17 16:15:04 +00:00
Henrik Levkowetz 0b971f635d Added test coverage data to the release pages if available for the release. Added saving of html pages for the code coverage to a directory in the static files area. If a code coverage report is available, a link to it will be shown on the release page of the current release. Renamed some setting variables related to test coverage to be more explicit and precise.
- Legacy-Id: 9201
2015-03-14 19:08:37 +00:00
Henrik Levkowetz 4b80218548 Merged in [9185] from rcross@amsl.com:
Add DocEvent and SubmissionEvent to merge-person-records.
 - Legacy-Id: 9197
Note: SVN reference [9185] has been migrated to Git commit cadf07fab3
2015-03-14 15:47:24 +00:00
Henrik Levkowetz d4f0ad4955 Fixed a pyflakes nit.
- Legacy-Id: 9189
2015-03-13 16:04:40 +00:00
Henrik Levkowetz f499ba8096 Started the code coverage measurements earlier, in order to make the apparent code coverage of model files less confusing.
- Legacy-Id: 9188
2015-03-13 16:02:31 +00:00
Henrik Levkowetz f15e515baf Added a fudge factor to the coverage test, in order to make it easier to do minor code changes.
- Legacy-Id: 9187
2015-03-13 15:56:13 +00:00
Henrik Levkowetz 1d28ec8f5b Made the test runner try multiple port numbers for the SMTP server, in order to handle the case where multiple test suites are in progress on the same host (which can happen when multiple buildbot slaves are running tests at the same time).
- Legacy-Id: 9186
2015-03-13 15:47:12 +00:00