mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-26 09:52:16 +00:00
Update Python Dependencies (#404)
* [requires.io] dependency update * Server starts... Various things are broken, but it runs! * [requires.io] dependency update * [requires.io] dependency update * [requires.io] dependency update * FIX: Broken migrations * FIX: Update auth framework * FIX: Correct static use in templates * FIX: Fix supplier sort * FIX: Remaining tests * Revert "Disable password reset as temporary fix to vulnerability (#396)" This reverts commite0c6a56263. # Conflicts: # RIGS/urls.py * FIX: Fix broken newlining in PDFs Introduced by a change in Django 2.1 'HTML rendered by form widgets no longer includes a closing slash on void elements, e.g. <br>. This is incompatible within XHTML, although some widgets already used aspects of HTML5 such as boolean attributes.' * FIX: Fix some Django4 deprecation warnings Why not... * Refactor dependency file Should now only include dependencies we actually use, not dependencies of dependencies and unused things * Add newlines to the paperwork print test event This will catch the error encountered in79ec9214f9* Swap to pycodestyle rather than pep8 in Travis And eliminate W605 errors * Bit too heavy handed with the dep purge there... * Whoops, helps if one installs pycodestyle... * FIX: Re-add overridden login view * Better fix for previous commit * FIX: Bloody smartquotes Co-authored-by: requires.io <support@requires.io>
This commit is contained in:
@@ -424,7 +424,7 @@ class RIGSVersionTestCase(TestCase):
|
||||
|
||||
def test_find_parent_version(self):
|
||||
# Find the most recent version
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created')
|
||||
self.assertEqual(currentVersion._object_version.object.notes, "A new note on the event")
|
||||
|
||||
# Check the prev version is loaded correctly
|
||||
@@ -436,7 +436,7 @@ class RIGSVersionTestCase(TestCase):
|
||||
|
||||
def test_changes_since(self):
|
||||
# Find the most recent version
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created')
|
||||
|
||||
changes = currentVersion.changes
|
||||
self.assertEqual(len(changes.field_changes), 1)
|
||||
@@ -453,7 +453,7 @@ class RIGSVersionTestCase(TestCase):
|
||||
self.event.save()
|
||||
|
||||
# Find the most recent version
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created')
|
||||
diff = currentVersion.changes
|
||||
|
||||
# There are two changes
|
||||
@@ -475,7 +475,7 @@ class RIGSVersionTestCase(TestCase):
|
||||
self.person.save()
|
||||
|
||||
# Find the most recent version
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.person).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.person).latest('revision__date_created')
|
||||
diff = currentVersion.changes
|
||||
|
||||
# Should be declared as long
|
||||
@@ -488,7 +488,7 @@ class RIGSVersionTestCase(TestCase):
|
||||
self.event.save()
|
||||
|
||||
# Find the most recent version
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created')
|
||||
|
||||
# Check the diff is correct
|
||||
self.assertEqual(currentVersion.changes.field_changes[0].diff,
|
||||
@@ -504,12 +504,12 @@ class RIGSVersionTestCase(TestCase):
|
||||
self.event.status = models.Event.CONFIRMED
|
||||
self.event.save()
|
||||
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created')
|
||||
self.assertEqual(currentVersion.changes.field_changes[0].old, 'Provisional')
|
||||
self.assertEqual(currentVersion.changes.field_changes[0].new, 'Confirmed')
|
||||
|
||||
def test_creation_behaviour(self):
|
||||
firstVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created').parent
|
||||
firstVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created').parent
|
||||
diff = firstVersion.changes
|
||||
|
||||
# Mainly to check for exceptions:
|
||||
@@ -522,7 +522,7 @@ class RIGSVersionTestCase(TestCase):
|
||||
self.event.save()
|
||||
|
||||
# Find the most recent version
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created')
|
||||
|
||||
diffs = currentVersion.changes.item_changes
|
||||
|
||||
@@ -541,7 +541,7 @@ class RIGSVersionTestCase(TestCase):
|
||||
item1.save()
|
||||
self.event.save()
|
||||
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created')
|
||||
|
||||
diffs = currentVersion.changes.item_changes
|
||||
|
||||
@@ -563,7 +563,7 @@ class RIGSVersionTestCase(TestCase):
|
||||
self.event.save()
|
||||
|
||||
# Find the most recent version
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest(field_name='revision__date_created')
|
||||
currentVersion = versioning.RIGSVersion.objects.get_for_object(self.event).latest('revision__date_created')
|
||||
|
||||
diffs = currentVersion.changes.item_changes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user