* adds tests for views in intervention app
* fixes bugs detected by test writing
This commit is contained in:
2021-10-26 11:38:34 +02:00
parent 100f31bda7
commit 023bdda545
6 changed files with 319 additions and 5 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ class Intervention(BaseObject, RecordableMixin, CheckableMixin):
)
# Create random token
token = generators.generate_random_string(15)
token = generators.generate_random_string(15, True, True, False)
token_used_in = Intervention.objects.filter(access_token=token)
# Make sure the token is not used anywhere as access_token, yet.
# Make use of QuerySet lazy method for checking if it exists or not.