Beispiel #1
0
 def test_retrive_role3(self):
     self.assertEquals(retrieve_role('sho_new_name'), ShoRole3)
Beispiel #2
0
 def test_retrieve_unknowun_role(self):
     role = retrieve_role('unknowun_role')
     self.assertIsNone(role)
Beispiel #3
0
 def save(self, *args, **kwargs):
     if self.account_type:
         role = retrieve_role(self.account_type)
         role.assign_role_to_user(self.user)
     super(UserProfile, self).save(*args, **kwargs)
Beispiel #4
0
 def test_retrive_role2(self):
     self.assertEquals(retrieve_role('sho_role2'), ShoRole2)
 def test_retrieve_unknowun_role(self):
     role = retrieve_role('unknowun_role')
     self.assertIsNone(role)
 def test_retrive_role3(self):
     self.assertEquals(retrieve_role('sho_new_name'), ShoRole3)
 def test_retrive_role2(self):
     self.assertEquals(retrieve_role('sho_role2'), ShoRole2)
 def test_retrive_role1(self):
     self.assertEquals(retrieve_role("sho_role1"), ShoRole1)
 def test_retrive_role2(self):
     self.assertEquals(retrieve_role('role2'), Role2)