Beispiel #1
0
 def test_get_endpoint_def_returns_endpoint_defs(self):
     """get_endpoint_def should return endpoint details."""
     ap = Actopus('myserver.mycomp.com', 'anapikey')
     epdef = ap.get_endpoint_def('projects', 'list')
     expected = {
         'action': 'list',
         'endpoint': '/projects/all',
         'method': 'GET'
     }
     self.assertEqual(epdef, expected)
Beispiel #2
0
 def test_get_endpoint_def_nonexisting_action(self):
     """get_endpoint_def should raise exception for nonexisting action."""
     ap = Actopus('myserver.mycomp.com', 'anapikey')
     with self.assertRaises(EndpointDataError) as cx:
         epdef = ap.get_endpoint_def('projects', 'notanaction')