Skip to content

Commit cf2e69d

Browse files
committed
Added tests for deprecated version
1 parent 57ed9c9 commit cf2e69d

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

gitlab_tests/keys/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ def test_keys(self):
2222
get_keys
2323
)
2424

25+
self.assertEqual(
26+
self.gitlab.getsshkey(1),
27+
get_keys
28+
)
29+
2530
@responses.activate
2631
def test_keys_with_bad_data(self):
2732
responses.add(
@@ -40,4 +45,7 @@ def test_keys_with_bad_data(self):
4045
# Don't raise exception when suppress http error is True
4146
self.gitlab.suppress_http_error = True
4247
self.assertFalse(self.gitlab.keys(1))
48+
49+
# Deprecated version test
50+
self.assertFalse(self.gitlab.getsshkey(1))
4351
self.gitlab.suppress_http_error = False

integration_tests/tests_v93/keys/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,12 @@ def test_get(self):
1414
HTTPError,
1515
self.gitlab.keys, 100
1616
)
17+
18+
def test_getsshkey(self):
19+
self.assertEqual(
20+
get_keys.keys(),
21+
self.gitlab.getsshkey(1).keys())
22+
23+
self.gitlab.suppress_http_error = True
24+
self.assertFalse(self.gitlab.getsshkey(100))
25+
self.gitlab.suppress_http_error = False

0 commit comments

Comments
 (0)