26 lines
582 B
Python
26 lines
582 B
Python
from rest_framework.test import APITestCase
|
|
from location.models import Country
|
|
from translation.models import Language
|
|
|
|
|
|
class BasePermissionTests(APITestCase):
|
|
def setUp(self):
|
|
|
|
self.lang = Language.objects.create(
|
|
title='Russia',
|
|
locale='ru-RU'
|
|
)
|
|
self.lang.save()
|
|
|
|
self.country_ru = Country.objects.create(
|
|
name='{"ru-RU":"Russia"}',
|
|
code='23',
|
|
low_price=15,
|
|
high_price=150000,
|
|
)
|
|
self.country_ru.languages.add(self.lang)
|
|
self.country_ru.save()
|
|
|
|
|
|
|