mirror of
https://github.com/gsi-upm/senpy
synced 2025-09-18 20:42:22 +00:00
Fix POST. Closes senpy/senpy#56
This commit is contained in:
@@ -24,6 +24,19 @@ class ModelsTest(TestCase):
|
||||
except Error:
|
||||
pass
|
||||
|
||||
def test_client_post(self):
|
||||
endpoint = 'http://dummy/'
|
||||
client = Client(endpoint)
|
||||
with patch_requests('http://dummy/', Results()):
|
||||
resp = client.analyse('hello')
|
||||
assert isinstance(resp, Results)
|
||||
with patch_requests('http://dummy/', Error('Nothing'), method='POST'):
|
||||
try:
|
||||
client.analyse(input='hello', method='POST', algorithm='NONEXISTENT')
|
||||
raise Exception('Exceptions should be raised. This is not golang')
|
||||
except Error:
|
||||
pass
|
||||
|
||||
def test_plugins(self):
|
||||
endpoint = 'http://dummy/'
|
||||
client = Client(endpoint)
|
||||
|
Reference in New Issue
Block a user