From 43fc16f8416f765cc4596694f466b68248983d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=20=D0=93=D0=BB=D0=B0?= =?UTF-8?q?=D0=B4=D0=BA=D0=B8=D1=85?= Date: Mon, 25 Nov 2019 12:29:53 +0300 Subject: [PATCH] Fix country test --- apps/location/tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/location/tests.py b/apps/location/tests.py index 3eaefd85..960f7f2b 100644 --- a/apps/location/tests.py +++ b/apps/location/tests.py @@ -25,12 +25,12 @@ class BaseTestCase(APITestCase): {'access_token': tokens.get('access_token'), 'refresh_token': tokens.get('refresh_token')}) - self.lang = Language.objects.get( + self.lang, created = Language.objects.get_or_create( title='Russia', locale='ru-RU' ) - self.country_ru = Country.objects.get( + self.country_ru, created = Country.objects.get_or_create( name={"en-GB": "Russian"} ) @@ -72,7 +72,7 @@ class CountryTests(BaseTestCase): self.assertEqual(response.status_code, status.HTTP_200_OK) update_data = { - 'name': json.dumps({"en-GB": "Test new country"}) + 'name': json.dumps({"ru-RU": "Test new country"}) } response = self.client.patch(f'/api/back/location/countries/{response_data["id"]}/', data=update_data)