Skip to content

Commit

Permalink
Merge pull request #40 from lendingblock/master
Browse files Browse the repository at this point in the history
0.3.3
  • Loading branch information
lsbardel authored Sep 10, 2018
2 parents 3645189 + c1c59db commit c501dd2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kong/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Asynchronous Kong client"""

__version__ = '0.3.2'
__version__ = '0.3.3'
4 changes: 4 additions & 0 deletions kong/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def create_jwt(self):
headers={'Content-Type': 'application/x-www-form-urlencoded'}
)

def get_jwt(self, id):
url = f'{self.url}/jwt/{id}'
return self.cli.execute(url)

def delete_jwt(self, id):
url = f'{self.url}/jwt/{id}'
return self.cli.execute(url, 'DELETE')
Expand Down
2 changes: 2 additions & 0 deletions tests/test_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ async def test_jwt_create(cli, consumer):
assert data
data = [d for d in data if d['id'] == jwt['id']]
assert data
jwt2 = await consumer.get_jwt(jwt['id'])
assert jwt == jwt2


async def test_jwt_delete(cli, consumer):
Expand Down

0 comments on commit c501dd2

Please sign in to comment.