Commit graph

268 commits

Author SHA1 Message Date
Robert Sparks cb659afd2f changed call to skip to make the code more readable
- Legacy-Id: 8134
2014-07-19 20:36:55 +00:00
Robert Sparks bdc9b7aa07 initial automated test, establishes framework
- Legacy-Id: 7933
2014-06-25 20:27:26 +00:00
Henrik Levkowetz b3c06d1e8c Patch from mcr@sandelman.ca: Correct the post data of a meeting test case.
- Legacy-Id: 7826
2014-06-02 21:40:42 +00:00
Henrik Levkowetz f86c59209f Changed the logic for what is the 'current' ietf meeting to disregard whether there's an agenda for the meeting or not. This lets people see the correct session request page for the current meeting. However, it also makes the /meeting/agenda.html page fail because there's no schedule associated with the meeting; so alternative pages saying 'No agenda available' has been added, too.
- Legacy-Id: 7641
2014-04-25 13:14:53 +00:00
Henrik Levkowetz bf1e44864d Merged in [7561] from rjsparks@nostrum.com:
Updates and bugfixes to the agenda editing features
* Removes the pattern of using ScheduledSession m2m objects with one of the relationships left as None
* Improves scheduled session state handling
* Simplifies sending email to scheduled session requestors
* Improved timeslot purpose and room editing
* Improved access controls to editing forms
* Better test coverage for the meeting views
* Improvements to the javascript driven by prototyping automated tests
* Better initialization of a new meeting
On the session request form:
  - Allows specifiying room resources (projectors, meetecho)
  - Allows specifying what people must be present
On the schedule editing page:
  - correctly calculates conflict levels
  - displays conflicts in and out of each session separately
  - italicizes BoFs
  - shows resource and people conflicts
Adds automated placement as a management command
 - Legacy-Id: 7628
Note: SVN reference [7561] has been migrated to Git commit 1221f79af9
2014-04-22 21:34:23 +00:00
Henrik Levkowetz 2c27eb481d Merged in [7519] from olau@iola.dk:
Remove uses of gzip middleware - the decorator thing breaks the ETags for some reason, as noted in issue #518, and it seems consensus is that we should do this in Apache instead for the whole site
 - Legacy-Id: 7602
Note: SVN reference [7519] has been migrated to Git commit 9ddecc1970
2014-04-12 18:50:01 +00:00
Henrik Levkowetz b02b0a96df All tests pass, except for some pyflakes tests which I believe are fixed in trunk.
- Legacy-Id: 7579
2014-04-06 20:04:36 +00:00
Robert Sparks 1221f79af9 Updates and bugfixes to the agenda editing features
* Removes the pattern of using ScheduledSession m2m objects with one of the relationships left as None
* Improves scheduled session state handling
* Simplifies sending email to scheduled session requestors
* Improved timeslot purpose and room editing
* Improved access controls to editing forms
* Better test coverage for the meeting views
* Improvements to the javascript driven by prototyping automated tests
* Better initialization of a new meeting
On the session request form:
  - Allows specifiying room resources (projectors, meetecho)
  - Allows specifying what people must be present
On the schedule editing page:
  - correctly calculates conflict levels
  - displays conflicts in and out of each session separately
  - italicizes BoFs
  - shows resource and people conflicts
Adds automated placement as a management command

Commit ready for merge.
 - Legacy-Id: 7561
2014-04-01 22:17:18 +00:00
Ryan Cross 0fafe56381 allow edit of timeslots, changes to scheduled notifications, support non-official schedules
- Legacy-Id: 7554
2014-03-28 23:16:41 +00:00
Henrik Levkowetz ff0dbe0d52 Merged in source:personal/henrik/r7446-pyflakes@7463, which adds pyflakes tests to the test suite, and makes the code pyflakes-clean.
- Legacy-Id: 7521
2014-03-19 18:48:33 +00:00
Ole Laursen 9ddecc1970 Remove uses of gzip middleware - the decorator thing breaks the ETags for some reason, as noted in issue #518, and it seems consensus is that we should do this in Apache instead for the whole site
- Legacy-Id: 7519
2014-03-19 17:40:21 +00:00
Robert Sparks be81557611 Shifted building the edit time slices from looking at scheduledsessions to looking at timeslots
- Legacy-Id: 7511
2014-03-17 21:49:01 +00:00
Robert Sparks 0d5a940f55 Create no ScheduledSessions with session=None
- Legacy-Id: 7510
2014-03-17 18:54:11 +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 c296cb479f Made ietf/meeting pyflakes-clean. Removed some debug-related dead code.
- Legacy-Id: 7473
2014-03-15 18:57:07 +00:00
Henrik Levkowetz 5bef5d11ae Made doc/ pyflakes-clean.
- Legacy-Id: 7462
2014-03-15 16:09:47 +00:00
Robert Sparks 08ae032169 added a roomresource to the meeting test data
- Legacy-Id: 7460
2014-03-14 20:24:03 +00:00
Robert Sparks 62600beefa improved test of scheduledsessions_json, added tests for extending a session
- Legacy-Id: 7459
2014-03-14 03:39:42 +00:00
Robert Sparks 1ef73b5a76 Reworked the worst of the conflicting permissions policies
- Legacy-Id: 7458
2014-03-13 20:45:06 +00:00
Robert Sparks f4a72ffe2a cleaned up permissions on dajaxice calls, ported and expanded more tests, refactored sendEmail, made a secr filter more robust
- Legacy-Id: 7457
2014-03-13 18:47:31 +00:00
Robert Sparks 1a3c2ce431 Patched meeting/ajax to close permissions vulnerability. Tweaked tests to check the right functionality given the permissions policy currently in trunk
- Legacy-Id: 7456
2014-03-13 17:39:34 +00:00
Robert Sparks f292af9949 minor comments and one addition to test_save_agenda...
- Legacy-Id: 7453
2014-03-12 17:34:27 +00:00
Robert Sparks ad2784962f ported forward from personal/rjs/trunk-7174. Still one existing test failing
- Legacy-Id: 7449
2014-03-08 10:37:24 +00:00
Henrik Levkowetz 722a008d25 Fixed overflow error for meetings without timeslots, which gave server errors for meeting/64/agenda.html.
- Legacy-Id: 7276
2014-02-20 11:26:52 +00:00
Robert Sparks b1e0ba3d1b Adds the IAB-parented sessions to the set of things returned as "areas"
Fixes bug #1288
Commit ready for merge
 - Legacy-Id: 7204
2014-02-04 15:59:34 +00:00
Henrik Levkowetz 6e97c2c8da Merged in the port from Django 1.2 to Django 1.6 from olau@iola.dk: branch/iola/djangoport@7121, and fixed some merge issues.
- Legacy-Id: 7152
2014-01-18 21:02:40 +00:00
Ole Laursen 7dcaed414d Add a simple test of the dajaxice.core.js hack for the time being
- Legacy-Id: 7084
2014-01-08 18:13:10 +00:00
Ole Laursen c7a2c64c10 Get rid of fixtures that were added for the meeting tests previously, they are not used anymore, and incomplete so will not load with Django 1.6
- Legacy-Id: 7070
2013-12-24 16:14:05 +00:00
Ole Laursen d5b14f3fb3 Rewrite meeting tests: add fake data generator, rewrite the
SimpleUrlTest tests to work with fake data and expand them a bit (they
are still pretty basic), rewrite the agenda editing tests to work with
the small generated fake data, delete those tests that are trivial or
only testing fixture facts as opposed to actually exercising the code,
combine some of them, expand most to actually check the returned JSON
and generally clean up the copy-paste mess of incorrect comments and
incorrect POST data.

At this point, no tests are using the real data base test machinery,
so one can run the full test suite with just

  python manage.py test --settings=settings_sqlitetest

This takes about 72 seconds one a 2.4 GHz Intel Core 2. The
test-crawler and other real data tests take somewhat longer, though.
 - Legacy-Id: 7069
2013-12-24 16:09:33 +00:00
Ole Laursen 3408b73872 Use request.POST directly instead of aliasing it to update_dict, add a
FIXME on permission naming
 - Legacy-Id: 7068
2013-12-24 15:59:01 +00:00
Ole Laursen f8b1568c87 Rewrite meeting PUTs to POSTs. For no apparent reason, parts of the
meeting AJAX code is using PUT instead of POST (even if it's not
PUT'ing in the literal sense but POST'ing). Theoretical discussions
aside, Django has poor support for PUTs turned POSTs so rewriting them
removes the need for a couple of hacks, and makes it easier to test.
 - Legacy-Id: 7067
2013-12-24 15:13:33 +00:00
Ole Laursen c098fb4f07 Regularize meeting_json to take num instead of meeting_num like the
other meeting AJAX views
 - Legacy-Id: 7060
2013-12-23 17:19:49 +00:00
Ole Laursen 77bd8772b5 Fix interesting syntax error in group_session_mapping, += was mistyped
as =+ which is legal (assignment followed by unary +)
 - Legacy-Id: 7059
2013-12-23 16:59:21 +00:00
Ole Laursen b4fa414406 Make agenda_permission use user_is_person, rewrite it to be a little
less verbose
 - Legacy-Id: 7054
2013-12-23 16:43:44 +00:00
Ole Laursen e69ba1e8c4 Fix spelling mistakes in comments for Constraint
- Legacy-Id: 7053
2013-12-23 16:08:36 +00:00
Ole Laursen b42a1165d7 Use .first() and prevent an extra .count() query in TimeSlot.session
- Legacy-Id: 7052
2013-12-23 15:40:10 +00:00
Ole Laursen 7dc534f325 Add a couple of select_related fields to edit_timeslots to reduce
number of DB queries from 400 to 13
 - Legacy-Id: 7051
2013-12-23 13:25:22 +00:00
Ole Laursen d6d80a4a77 Make a couple of the utility methods in meeting.models use .first(),
fix potential bug in slot_to_the_right, test on location_id instead of
location in build_timeslices to speed up the edit timeslots view
 - Legacy-Id: 7050
2013-12-23 13:24:40 +00:00
Ole Laursen fa489ce37a Upgrade Dajaxice to latest version from github (0.5.5) to make meeting agenda code work with CSRF, with url conf import fix and using json instead of deprecated simplejson from Django - add a simple view to serve dajaxice.core.js which we need because we are not using the staticfiles collection step (apparently Dajaxice hooks into that through a somewhat complicated hack)
- Legacy-Id: 7028
2013-12-20 11:59:09 +00:00
Ole Laursen 88860edba4 Use user_is_person to determine whether user is schedule owner in
agenda AJAX, instead of complicated try except
 - Legacy-Id: 7027
2013-12-20 11:55:25 +00:00
Ole Laursen 38c153c03d Remove usage of distinct(field) in meeting/helpers.py, Django
complains that it doesn't work on MySQL and the two uses appear
superfluous anyway since they only return the field being distincted
 - Legacy-Id: 7018
2013-12-19 16:06:37 +00:00
Henrik Levkowetz d416ae7977 Merged in a fix from Ole. A different fix for the same problem was already present, but by picking Ole's fix here we avoid hassle in the next (Django-upgrade) merge.
- Legacy-Id: 6993
2013-12-18 18:39:49 +00:00
Ole Laursen f88fb5f9ac Port meeting fix from shimfree branch
- Legacy-Id: 6984
2013-12-18 14:56:37 +00:00
Ole Laursen 0945255452 Fix bug in meeting.helper.get_meeting - somehow managed to skip the
clause that makes sure that meetings that have no agenda yet are
skipped
 - Legacy-Id: 6983
2013-12-18 14:51:03 +00:00
Ole Laursen e348600bcb raw_post_data -> body
- Legacy-Id: 6976
2013-12-18 11:52:21 +00:00
Ole Laursen 7f277a8fbb Replace user.get_profile() with user.person, the profile stuff is deprecated since Django 1.5
- Legacy-Id: 6968
2013-12-18 10:13:40 +00:00
Henrik Levkowetz ecb5cd6526 Merged in branch/iola/shimfree@6856. This pretty much completes the shim removal. Next step is upgrading Django to 1.6, and then doing some final polishing.
- Legacy-Id: 6966
2013-12-17 21:29:05 +00:00
Ole Laursen 42ade6273c Turn on CSRF protection - all forms must from now on have a {% csrf_token %}
- Legacy-Id: 6963
2013-12-17 12:50:24 +00:00
Ole Laursen d66ac15fc2 Rewrite a bunch of HttpResponseRedirect + url reverse calls to instead
take advantage of the redirect shortcut (introduced in Django 1.1)
 - Legacy-Id: 6960
2013-12-17 10:23:42 +00:00
Henrik Levkowetz 8b2730a499 Updated agenda test files. Looking forward to moving this to fixtures instead of live data.
- Legacy-Id: 6949
2013-12-16 22:08:00 +00:00