aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-10-15 21:44:40 +0200
committerEgor Tensin <Egor.Tensin@gmail.com>2022-10-15 21:44:40 +0200
commitb7aa78ba05d3882436145b672c0493fba0083c80 (patch)
treeaa9427ef9eed2dc5f860ea6f6f9a4a102fccf5d9 /test
parentMakefile: add venv-update command (diff)
downloadcgitize-b7aa78ba05d3882436145b672c0493fba0083c80.tar.gz
cgitize-b7aa78ba05d3882436145b672c0493fba0083c80.zip
bump dependencies
Unfortunately, atlassian-python-api doesn't follow the "same major version = no breakage" principle, and happily broke a number of things between 3.25.0 and 3.28.1. Oh well, let's fix the version at 3.28.X, I guess.
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_bitbucket.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/unit/test_bitbucket.py b/test/unit/test_bitbucket.py
index 7a070ce..fdf55ea 100644
--- a/test/unit/test_bitbucket.py
+++ b/test/unit/test_bitbucket.py
@@ -15,22 +15,22 @@ class BitbucketTests(unittest.TestCase):
def test_nonexistent_repo(self):
with self.assertRaises(HTTPError):
- self.bitbucket.repositories.get('doesnot/exist')
+ self.bitbucket.repositories.get('doesnot', 'exist')
def test_existing_repo(self):
- r = self.bitbucket.repositories.get('egor-tensin/cgitize-test-repository')
- self.assertEqual(r['name'], 'cgitize-test-repository')
- self.assertEqual(r['description'], 'Test cgitize repository')
+ r = self.bitbucket.repositories.get('egor-tensin', 'cgitize-test-repository')
+ self.assertEqual(r.name, 'cgitize-test-repository')
+ self.assertEqual(r.description, 'Test cgitize repository')
- self.assertEqual(r['owner']['display_name'], 'Egor Tensin')
- self.assertEqual(r['owner']['nickname'], 'egor-tensin')
+ self.assertEqual(r.data['owner']['display_name'], 'Egor Tensin')
+ self.assertEqual(r.data['owner']['nickname'], 'egor-tensin')
- self.assertEqual(r['links']['html']['href'], 'https://bitbucket.org/egor-tensin/cgitize-test-repository')
+ self.assertEqual(r.get_link('html'), 'https://bitbucket.org/egor-tensin/cgitize-test-repository')
- clone_urls = [link for link in r['links']['clone'] if link['name'] == 'https']
+ clone_urls = [link for link in r.data['links']['clone'] if link['name'] == 'https']
self.assertEqual(len(clone_urls), 1)
self.assertEqual(clone_urls[0]['href'], 'https://bitbucket.org/egor-tensin/cgitize-test-repository.git')
- ssh_urls = [link for link in r['links']['clone'] if link['name'] == 'ssh']
+ ssh_urls = [link for link in r.data['links']['clone'] if link['name'] == 'ssh']
self.assertEqual(len(ssh_urls), 1)
self.assertEqual(ssh_urls[0]['href'], 'git@bitbucket.org:egor-tensin/cgitize-test-repository.git')