Skip to content

Commit 0488c83

Browse files
authored
Merge pull request #13372 from valentijnscholten/dedupe-importers-unittests
add unit tests to test importer deduplication
2 parents c074ae1 + f38cb19 commit 0488c83

6 files changed

Lines changed: 1718 additions & 37 deletions

unittests/dojo_test_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def __init__(self, *args, **kwargs):
499499

500500
def login_as_admin(self):
501501
testuser = self.get_test_admin()
502-
token = Token.objects.get(user=testuser)
502+
token, _ = Token.objects.get_or_create(user=testuser)
503503
self.client = APIClient()
504504
self.client.credentials(HTTP_AUTHORIZATION="Token " + token.key)
505505

0 commit comments

Comments
 (0)