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)