SHOW:
|
|
- or go back to the newest paste.
1 | from django.test import TestCase | |
2 | ||
3 | from main_app.register import CatalogItem | |
4 | from main_app.exceptions import * | |
5 | ||
6 | ||
7 | class TestModulesCase(TestCase): | |
8 | """Modules test""" | |
9 | ||
10 | ||
11 | def test_register_method(self): | |
12 | item = CatalogItem('Name') | |
13 | item.register(cls) # Передаешь какой-то класс | |
14 | # Дальше проверяешь что хочешь. | |
15 | ||
16 | ||
17 | def __init__(self, *args, **kwargs): | |
18 | super().__init__(*args, **kwargs) | |
19 | ||
20 | self.loaded = CatalogItem.REGISTRY |