def query_repository(repo_name): """Return all information about a specific repository.""" return buildapi.query_repository(repo_name)
def test_invalid(self, query_repositories): """query_repository should raise an Exception when the repo is invalid.""" with self.assertRaises(Exception): buildapi.query_repository("not-a-repo")
def test_query_repository(self, query_repositories): """Test with a valid repo name.""" self.assertEquals(buildapi.query_repository('repo1'), json.loads(REPOSITORIES)['repo1'])
def test_query_repository(self, query_repositories): """Test with a valid repo name.""" self.assertEquals( buildapi.query_repository('repo1'), json.loads(REPOSITORIES)['repo1'])