Exemplo n.º 1
0
 def test_get_all_repos_caches_results(self):
     command = ListDockerRepositoriesCommand(self.context)
     command.all_repos_cache = 'foo'
     result = command._all_repos({'bar': 'baz'})
     self.assertFalse(self.context.server.repo.repositories.called)
     self.assertEquals('foo', result)
Exemplo n.º 2
0
 def test_get_all_repos(self):
     self.context.server.repo.repositories.return_value.response_body = 'foo'
     command = ListDockerRepositoriesCommand(self.context)
     result = command._all_repos({'bar': 'baz'})
     self.context.server.repo.repositories.assert_called_once_with({'bar': 'baz'})
     self.assertEquals('foo', result)