Fix country test
This commit is contained in:
parent
28a3e022f6
commit
43fc16f841
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user