class BaseTestCaseMixin object model_name object_factory None def __in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
class BaseTestCaseMixin(object):
model_name = ''
object_factory = None
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
model_name_message = (
'You have to specify model_name property in order to be able to use test mixins'
)
assert self.model_name != '', model_name_message
object_factory_message = (
'You have to specify object_factory property in order to be able to use test mixins'
)
assert self.object_factory is not None, object_factory_message
self.__reverse_name = self.model_name.lower()
self.__reverse_list = self.__reverse_name + '-list'
self.__reverse_detail = self.__reverse_name + '-detail'