Changes between Initial Version and Version 2 of Ticket #27817
- Timestamp:
- Feb 7, 2017, 7:24:12 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27817
- Property Component Uncategorized → Database layer (models, ORM)
-
Ticket #27817 – Description
initial v2 19 19 {{{ 20 20 class TestPermission(TestCase): 21 self.site, created = Site.objects.get_or_create( 22 defaults={ 23 'domain': 'testserver' 24 }, 25 id=settings.SITE_ID) 26 self.permission_template, created = \ 27 PermissionTemplate.on_site.get_or_create( 28 site=self.site, 29 name='test_template', 21 @classmethod 22 def setUpTestData(self): 23 self.site, created = Site.objects.get_or_create( 30 24 defaults={ 31 'values': { 32 'open_imovel': 1, 33 'named_imovel': 3, 34 'sharing': 0, 35 'owner_data': 0, 36 'aggrements': 0, 37 'users': 0, 38 'internal': True, 39 'default': True 25 'domain': 'testserver' 26 }, 27 id=settings.SITE_ID) 28 self.permission_template, created = \ 29 PermissionTemplate.on_site.get_or_create( 30 site=self.site, 31 name='test_template', 32 defaults={ 33 'values': { 34 'open_imovel': 1, 35 'named_imovel': 3, 36 'sharing': 0, 37 'owner_data': 0, 38 'aggrements': 0, 39 'users': 0, 40 'internal': True, 41 'default': True 42 } 40 43 } 41 } 42 ) 44 ) 43 45 }}}