Beispiel #1
0
 def setUp(self):
     config = client.APIConfig(url="http://localhost:8000/api/v1",
                               token="token")
     deployments = endpoints.Deployments(config)
     self.raw_data = json.loads(load_fixture("ubuntu_deployment_data.json"))
     self.deployment = resources.Deployment(data=self.raw_data)
     self.deployment.register_update_endpoint(deployments)
Beispiel #2
0
 def setUp(self):
     config = client.APIConfig(url="http://localhost:8000/api/v1",
                               token="token")
     applications = endpoints.Applications(config)
     self.application = resources.Application(
         data=json.loads(load_fixture("ubuntu_application_data.json")))
     self.application.register_update_endpoint(applications)
 def setUp(self):
     self.coreapi_client_mock = unittest.mock.create_autospec(
         coreapi.Client, instance=True)
     self.coreapi_client_patcher = unittest.mock.patch(
         'coreapi.Client', return_value=self.coreapi_client_mock)
     self.coreapi_client_patcher.start()
     self.addCleanup(self.coreapi_client_patcher.stop)
     self.config = client.APIConfig(url="http://localhost:8000/api/v1",
                                    token="abc123")
     self.parent_endpoint = ParentEndpoint(self.config)