Пример #1
0
 def test_disassociate_users_from_group(self):
     with Router() as router:
         result = router.disassociate_users_from_group([], "", "any")
         self.assertEqual(0, result.status)
         self.assertEqual(0, result.response["Handler1"]["status"])
         self.assertEqual("disassociate_users_from_group:handler1",
                          result.response["Handler1"]["response"])
         self.assertEqual(0, result.response["Handler2"]["status"])
         self.assertEqual("disassociate_users_from_group:handler2",
                          result.response["Handler2"]["response"])
Пример #2
0
 def test_exists_user(self):
     with Router() as router:
         result = router.exists_user("", "any")
         self.assertEqual(0, result.status)
         self.assertEqual(0, result.response["Handler1"]["status"])
         self.assertEqual("exists_user:handler1",
                          result.response["Handler1"]["response"])
         self.assertEqual(0, result.response["Handler2"]["status"])
         self.assertEqual("exists_user:handler2",
                          result.response["Handler2"]["response"])
Пример #3
0
 def test_set_user_default_group(self):
     with Router() as router:
         result = router.set_user_default_group("", "", "any")
         self.assertEqual(0, result.status)
         self.assertEqual(0, result.response["Handler1"]["status"])
         self.assertEqual("set_user_default_group:handler1",
                          result.response["Handler1"]["response"])
         self.assertEqual(0, result.response["Handler2"]["status"])
         self.assertEqual("set_user_default_group:handler2",
                          result.response["Handler2"]["response"])
Пример #4
0
 def test_get_members(self):
     with Router() as router:
         result = router.get_members("", "any")
         self.assertEqual(0, result.status)
         self.assertEqual(0, result.response["Handler1"]["status"])
         self.assertEqual("get_members:handler1",
                          result.response["Handler1"]["response"])
         self.assertEqual(0, result.response["Handler2"]["status"])
         self.assertEqual("get_members:handler2",
                          result.response["Handler2"]["response"])
Пример #5
0
 def test_update_user(self):
     with Router() as router:
         result = router.update_user({}, "any")
         self.assertEqual(0, result.status)
         self.assertEqual(0, result.response["Handler1"]["status"])
         self.assertEqual("update_user:handler1",
                          result.response["Handler1"]["response"])
         self.assertEqual(0, result.response["Handler2"]["status"])
         self.assertEqual("update_user:handler2",
                          result.response["Handler2"]["response"])
Пример #6
0
 def test_add_group(self):
     with Router() as router:
         result = router.add_group({}, "any")
         self.assertEqual(0, result.status)
         self.assertEqual(0, result.response["Handler1"]["status"])
         self.assertEqual("add_group:handler1",
                          result.response["Handler1"]["response"])
         self.assertEqual(0, result.response["Handler2"]["status"])
         self.assertEqual("add_group:handler2",
                          result.response["Handler2"]["response"])
Пример #7
0
 def test_disassociate_users_from_group(self):
     with Router() as router:
         result = router.disassociate_users_from_group([], "", "any")
         self.assertEqual(470, result.status)
Пример #8
0
 def test_associate_user_to_group(self):
     with Router() as router:
         result = router.associate_user_to_group("", "", "any")
         self.assertEqual(470, result.status)
Пример #9
0
 def test_set_user_default_group(self):
     with Router() as router:
         result = router.set_user_default_group("", "", "any")
         self.assertEqual(470, result.status)
Пример #10
0
 def test_delete_user(self):
     with Router() as router:
         result = router.delete_user("", "any")
         self.assertEqual(470, result.status)
Пример #11
0
 def test_update_user(self):
     with Router() as router:
         result = router.update_user({}, "any")
         self.assertEqual(470, result.status)
Пример #12
0
 def test_add_group(self):
     with Router() as router:
         result = router.add_group({}, "any")
         self.assertEqual(470, result.status)