def test_get_commit(self): resp = self.app.get('/sha/{0}'.format(COMMIT_HEX)) highlight_stripped = SPAN_REGEX.sub('', resp.data) self.assertIn('transport: Add `git_transport_valid_url`', highlight_stripped) self.assertIn('Vicent Marti', highlight_stripped) self.assertIn('*****@*****.**', highlight_stripped) self.assertIn('parent_6616e207506d2c3ac287a3c5e631b3d442464bed', highlight_stripped) self.assertIn('include/git2/transport.h', highlight_stripped) self.assertIn('src/transport.c', highlight_stripped) self.assertIn(' * Return whether a string is a valid transport URL', highlight_stripped) self.assertIn('/* TODO: Parse "example.com:project.git" as an SSH URL */', highlight_stripped)
def test_get_blob(self): resp = self.app.get('/sha/{0}'.format(README_BLOB)) highlight_stripped = SPAN_REGEX.sub('', resp.data) self.assertIn('libgit2 - the Git linkable library',highlight_stripped)