fixed regression introduced
This commit is contained in:
@@ -135,7 +135,7 @@ class CountryViewSetTest(APITestCase):
|
||||
self.model = models.Country
|
||||
# create user
|
||||
self.password = ''.join(random.choices(string.ascii_uppercase, k = 10))
|
||||
self.user = CustomUserFactory(password=self.password)
|
||||
self.user = CustomUserFactory(email="test@mail.com", password=self.password, is_active=True)
|
||||
|
||||
def test_anon_user_cannot_create_country(self):
|
||||
"""Not logged-in user cannot create new country
|
||||
@@ -263,7 +263,7 @@ class RegionViewSetTest(APITestCase):
|
||||
self.model = models.Region
|
||||
# create user
|
||||
self.password = ''.join(random.choices(string.ascii_uppercase, k = 10))
|
||||
self.user = CustomUserFactory(password=self.password)
|
||||
self.user = CustomUserFactory(email="test@mail.com", password=self.password, is_active=True)
|
||||
|
||||
def test_not_logged_user_cannot_create_instance(self):
|
||||
"""Not logged-in user cannot create new region
|
||||
@@ -397,7 +397,7 @@ class ProvinceViewSetTest(APITestCase):
|
||||
self.model = models.Province
|
||||
# create user
|
||||
self.password = ''.join(random.choices(string.ascii_uppercase, k = 10))
|
||||
self.user = CustomUserFactory(password=self.password)
|
||||
self.user = CustomUserFactory(email="test@mail.com", password=self.password, is_active=True)
|
||||
|
||||
def test_not_logged_user_cannot_create_instance(self):
|
||||
"""Not logged-in user cannot create new instance
|
||||
@@ -531,7 +531,7 @@ class CityViewSetTest(APITestCase):
|
||||
self.model = models.City
|
||||
# create user
|
||||
self.password = ''.join(random.choices(string.ascii_uppercase, k = 10))
|
||||
self.user = CustomUserFactory(password=self.password)
|
||||
self.user = CustomUserFactory(email="test@mail.com", password=self.password, is_active=True)
|
||||
|
||||
def test_not_logged_user_cannot_create_city(self):
|
||||
"""Not logged-in user cannot create new city
|
||||
|
||||
Reference in New Issue
Block a user