Skip to content

Commit 345b50e

Browse files
committed
Make coveralls happy
1 parent f2cf60a commit 345b50e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/interface_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,16 @@ def test_ensure_token(self):
251251
token = self.client.ensure_token(self.username_password, self.expected_token.name, self.username_password.username)
252252
self.assertEqual(token.token, self.expected_token.sha1)
253253

254+
@responses.activate
255+
def test_ensure_auth_token(self):
256+
uri = self.path("/user")
257+
responses.add(responses.GET, uri, body=self.user_json_str, status=200)
258+
uri = self.path("/users/{}/tokens".format(self.expected_user.username))
259+
responses.add(responses.GET, uri, body="[]", status=200)
260+
responses.add(responses.POST, uri, body=self.token_json_str, status=200)
261+
token = self.client.ensure_token(self.username_password, self.expected_token.name)
262+
self.assertEqual(token.token, self.expected_token.sha1)
263+
254264
# helper methods
255265

256266
@staticmethod

0 commit comments

Comments
 (0)