Пример #1
0
 def setUp(self):
     profile = UserProfileFactory.create(user__username='******',
                                         user__password='******')
     user = profile.user
     user.groups.add(Group.objects.get(name=u"Référents communication"))
     self.client.login(username=user.username, password='******')
     self.event1 = TouristicEventFactory.create()
     structure = StructureFactory.create()
     self.event2 = TouristicEventFactory.create(structure=structure)
Пример #2
0
 def setUp(self):
     profile = UserProfileFactory.create(user__username='******',
                                         user__password='******')
     user = profile.user
     user.groups.add(Group.objects.get(name=u"Référents communication"))
     self.client.login(username=user.username, password='******')
     self.content1 = POIFactory.create()
     structure = StructureFactory.create()
     self.content2 = POIFactory.create(structure=structure)
Пример #3
0
 def setUp(self):
     profile = UserProfileFactory.create(user__username='******',
                                         user__password='******')
     user = profile.user
     user.user_permissions.add(Permission.objects.get(codename="add_sensitivearea"))
     user.user_permissions.add(Permission.objects.get(codename="change_sensitivearea"))
     user.user_permissions.add(Permission.objects.get(codename="delete_sensitivearea"))
     user.user_permissions.add(Permission.objects.get(codename="read_sensitivearea"))
     user.user_permissions.add(Permission.objects.get(codename="export_sensitivearea"))
     self.client.login(username=user.username, password='******')
     self.area1 = SensitiveAreaFactory.create()
     structure = StructureFactory.create()
     self.area2 = SensitiveAreaFactory.create(structure=structure)
Пример #4
0
 def setUp(self):
     profile = UserProfileFactory.create(user__username='******',
                                         user__password='******')
     user = profile.user
     user.user_permissions.add(Permission.objects.get(codename=u"add_sensitivearea"))
     user.user_permissions.add(Permission.objects.get(codename=u"change_sensitivearea"))
     user.user_permissions.add(Permission.objects.get(codename=u"delete_sensitivearea"))
     user.user_permissions.add(Permission.objects.get(codename=u"read_sensitivearea"))
     user.user_permissions.add(Permission.objects.get(codename=u"export_sensitivearea"))
     self.client.login(username=user.username, password='******')
     self.area1 = SensitiveAreaFactory.create()
     structure = StructureFactory.create()
     self.area2 = SensitiveAreaFactory.create(structure=structure)