Commit graph

103 commits

Author SHA1 Message Date
Henrik Levkowetz 2d858f2e0a Added mypy and django-stubs to Py3 requirements, and added a mypy test case.
- Legacy-Id: 16768
2019-09-30 15:37:32 +00:00
Ryan Cross d332bfd91d Added encoding='utf-8' parameter to io.open operations in tests that starting failing since adding unicode_literals. Commit ready to merge
- Legacy-Id: 16562
2019-07-20 22:54:14 +00:00
Henrik Levkowetz fb3d4ddb0b Added information about versions (Datatracker, Python, and Django) at the beginning of test suite runs.
- Legacy-Id: 16516
2019-07-17 20:54:51 +00:00
Henrik Levkowetz 627f8a7eab Modified code to write release coverage json data to gzip file under both Py2 and Py3.
- Legacy-Id: 16475
2019-07-16 21:58:38 +00:00
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 6732e7acff Fixed an issue with a gzip file mode.
- Legacy-Id: 16436
2019-07-08 18:30:34 +00:00
Henrik Levkowetz 0679eaa8d4 Removed unused imports.
- Legacy-Id: 16402
2019-07-04 21:06:57 +00:00
Henrik Levkowetz f480799af9 Undid unintentional bulk commit
- Legacy-Id: 16401
2019-07-04 21:04:46 +00:00
Henrik Levkowetz fc09a59950 Added decode() of command pipe output.
- Legacy-Id: 16400
2019-07-04 21:01:39 +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 ba528a0c5e Adjusted the test_runner to generate migration coverage data also when permitting mixed migrations.
- Legacy-Id: 16280
2019-06-17 18:24:17 +00:00
Henrik Levkowetz 815602351f This is a series of 50 migrations that changes the Document and DocAlias
primary keys from character strings to integers, and makes corresponding code
changes.

This was prompted by database limitations discovered when trying to make
DocAlias use a m2m document field; with 255 long strings as primary keys for
Document and DocAlias this violated the MySQL database limitations.

Changing the primary keys to integers should also improve efficiency.  

Due to the data migrations which create the new integer primary keys and adds
corresponding integer foreign keys matching the previous string foreign keys
in all tables having foreign keys to Document and DocAlias, some of these
migrations take a long time.  The total set of migrations are expected to have
a runtime on the order of 2 hours.
 - Legacy-Id: 16237
2019-06-10 11:32:46 +00:00
Henrik Levkowetz fd62a25f4e Added a missing variable initialization.
- Legacy-Id: 15925
2019-02-04 11:26:29 +00:00
Henrik Levkowetz 57a4c9f41f Added 9 new group features, and changed list-like char fields to json fields, to get better support for using the values as lists. Modified code to use the group features instead of explicit lists of group types in many places in the code.
- Legacy-Id: 15908
2019-01-22 18:11:46 +00:00
Henrik Levkowetz 0cc7f73d58 Additional tweaks to submission yang testing and the test runner
- Legacy-Id: 15870
2019-01-07 13:38:44 +00:00
Henrik Levkowetz a96c6c4c5b Tweaked the test runner to more consistently force the test coverage tests to be run last.
- Legacy-Id: 15030
2018-04-08 12:42:03 +00:00
Henrik Levkowetz d6e4404d63 Only do coverage set/reset operations if we're in test mode. Fixes a 500 error during draft submission yang checking.
- Legacy-Id: 14569
2018-01-25 11:31:38 +00:00
Henrik Levkowetz 9be7d57a03 Tweaked the test-runner random state handling to display the correct random state filename and make sure to set the same random state.
- Legacy-Id: 14209
2017-10-14 12:05:01 +00:00
Henrik Levkowetz 2c1438c240 Moved unidecode_name from utils.text to person.name.
Modified UserFactory to use a new locale for each new user, instead of the
same locale for a whole test run.  This (almost) ensures the exercise of
code to deal with non-ascii names, something which would not happen if a
locale with ascii names was chosen at the start of a run.

Modified name.initials() to not use non-word characters as initials.

Modified unidecode_name() to do more normalization, to conform to the
conventions used in internet-drafts.

Added saving of the factory-boy random state in order to be able to re-run
a test suite with the same pseudo-random sequence as in a previous failed
run.

Fixed an issue with email formatting in test_api_submit_ok().

Modified the draft author extraction code to deal better with names with
embedded apostrophes.
 - Legacy-Id: 14141
2017-09-20 15:36:30 +00:00
Henrik Levkowetz 1eeaf49c5c Added an error exit when the test runner is invoked with incompatible switches (--parallel and --html-report)
- Legacy-Id: 14024
2017-08-02 13:00:16 +00:00
Henrik Levkowetz d00921b94b Added a new release-coverage format which whould make it easier to show line-by-line code test coverage changes in the future.
- Legacy-Id: 13967
2017-07-24 17:38:00 +00:00
Henrik Levkowetz eceed7476d Added the html_report switch setting to the test runner object.
- Legacy-Id: 13822
2017-07-09 18:10:51 +00:00
Henrik Levkowetz ca921fe45d Added a switch to control generation of the code coverage html report, which now defaults to false. The report can be generated post-testing with "coverage html -d static/coverage/".
- Legacy-Id: 13821
2017-07-09 16:50:38 +00:00
Henrik Levkowetz d26c7085c6 Added code coverage settings and configuration to ignore debug-related lines of code.
- Legacy-Id: 13817
2017-07-09 15:00:22 +00:00
Henrik Levkowetz f6f0278859 Changed the url coverage code to handle deeper chains of url includes, and to handle url includes through url lists in addition to url modules. Added information in the release coverage dictionaries about the view functions coupled to the urls.
- Legacy-Id: 13706
2017-06-22 15:07:06 +00:00
Henrik Levkowetz 4dcdda08d2 Added a test to the test suite which checks if there are interleaved schema and data migrations that have not been released yet. Having split migrations, first all schema and then all data, will permit doing 2 sequential releases; but if the data and schema migrations are interleaved (beyond this) it is problematic to arrange for release without ending up with a prolonged period when running code and table structure is out of sync (while the normally more time-consuming data migrations run).
- Legacy-Id: 13576
2017-06-09 21:37:14 +00:00
Henrik Levkowetz 76628be3fd Merged in ^/branch/iola/author-stats-r13145 from olau@iola.dk, and fixed some tests in code which moved after the latest merge with trunk. The test suite passes, but the migrations are _not_ ready to run, because of numbering conflicts (again due to code changes on trunk since the latest sync).
- Legacy-Id: 13479
2017-05-31 20:59:26 +00:00
Henrik Levkowetz d6b9392f72 Fixed an if-statement which incorrectly disabled coverage testing when the parallel testing count was set to 1.
- Legacy-Id: 13231
2017-04-18 16:47:28 +00:00
Ole Laursen a1ba9dfb0a Remove accidentally committed debug
- Legacy-Id: 13160
2017-03-28 14:56:06 +00:00
Ole Laursen 5b677dc6ba Merge author stats branch into new branch from trunk
- Legacy-Id: 13159
2017-03-28 14:36:40 +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
Ole Laursen 5608ad0061 Move the assert on new X in the test coverage up before the percentage
to try get the list of URLs out before the percentage
 - Legacy-Id: 13144
2017-03-27 08:45:20 +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 5928bd9faa Added svn symlink check and creation to test setup. Forced test settings to use an empty INTERNAL_IPS list for consistency in code coverage figures.
- Legacy-Id: 12929
2017-02-28 18:02:30 +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 7f607c51d2 Changed from old-style to new-style middleware.
- Legacy-Id: 12824
2017-02-12 17:07:48 +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 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
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 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
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 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
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 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 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 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