# Refactoring revocation views
* refactors views for adding, editing and removing revocations * refactors view for getting the document of a revocation * updates tests
This commit is contained in:
@@ -280,7 +280,7 @@ class EditRevocationModalFormTestCase(NewRevocationModalFormTestCase):
|
||||
data,
|
||||
request=self.request,
|
||||
instance=self.intervention,
|
||||
revocation=self.revoc
|
||||
revocation_id=self.revoc.id
|
||||
)
|
||||
self.assertTrue(form.is_valid(), msg=form.errors)
|
||||
obj = form.save()
|
||||
@@ -302,7 +302,7 @@ class RemoveRevocationModalFormTestCase(EditRevocationModalFormTestCase):
|
||||
form = RemoveRevocationModalForm(
|
||||
request=self.request,
|
||||
instance=self.intervention,
|
||||
revocation=self.revoc,
|
||||
revocation_id=self.revoc.id,
|
||||
)
|
||||
self.assertEqual(form.instance, self.intervention)
|
||||
self.assertEqual(form.revocation, self.revoc)
|
||||
@@ -317,7 +317,7 @@ class RemoveRevocationModalFormTestCase(EditRevocationModalFormTestCase):
|
||||
data,
|
||||
request=self.request,
|
||||
instance=self.intervention,
|
||||
revocation=self.revoc
|
||||
revocation_id=self.revoc.id
|
||||
)
|
||||
self.assertTrue(form.is_valid(), msg=form.errors)
|
||||
form.save()
|
||||
|
||||
Reference in New Issue
Block a user