aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-01-20 11:26:40 +0100
committerGravatar Johannes Christ <[email protected]>2019-01-20 11:26:40 +0100
commitdc1dca59f1642460effbd7185711c5f691a19e9c (patch)
tree1bdb501ff3d6a5d2b772adb6ec520097fb4e2583
parentMake the flakes happy. (diff)
Do not rely on hardcoded ID.
-rw-r--r--api/tests/test_infractions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/tests/test_infractions.py b/api/tests/test_infractions.py
index 42010973..7c370c17 100644
--- a/api/tests/test_infractions.py
+++ b/api/tests/test_infractions.py
@@ -181,7 +181,7 @@ class CreationTests(APISubdomainTestCase):
response = self.client.post(url, data=data)
self.assertEqual(response.status_code, 201)
- infraction = Infraction.objects.get(id=1)
+ infraction = Infraction.objects.get(id=response.json()['id'])
self.assertAlmostEqual(
infraction.inserted_at,
dt.now(timezone.utc),