mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 03:41:08 +00:00
* Add support for getting and replacing topics on a repository #634 * Add / fix tests, accept list vs dict for replace_topics (#634)
This commit is contained in:
committed by
Wan Liuyang
parent
68af7250f9
commit
c6802b515f
@@ -82,6 +82,7 @@ class Repository(Framework.TestCase):
|
||||
self.assertEqual(self.repo.source, None)
|
||||
self.assertEqual(self.repo.ssh_url, "git@github.com:jacquev6/PyGithub.git")
|
||||
self.assertEqual(self.repo.svn_url, "https://github.com/jacquev6/PyGithub")
|
||||
self.assertEqual(self.repo.topics, None)
|
||||
self.assertEqual(self.repo.updated_at, datetime.datetime(2012, 5, 27, 6, 55, 28))
|
||||
self.assertEqual(self.repo.url, "https://api.github.com/repos/jacquev6/PyGithub")
|
||||
self.assertEqual(self.repo.watchers, 15)
|
||||
@@ -711,6 +712,13 @@ class Repository(Framework.TestCase):
|
||||
def testGetLicense(self):
|
||||
self.assertEqual(len(self.repo.get_license().content), 47646)
|
||||
|
||||
def testGetTopics(self):
|
||||
topic_list = self.repo.get_topics()
|
||||
topic = u'github'
|
||||
self.assertIn(topic, topic_list)
|
||||
|
||||
def testReplaceTopics(self):
|
||||
self.repo.replace_topics(['github', 'testing'])
|
||||
|
||||
class LazyRepository(Framework.TestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user