918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change
on this file since 72d9295 was
7137439,
checked in by OpenGnSys Support Team <soporte-og@…>, 6 years ago
|
#915 add test for GET /clients REST API
|
-
Property mode set to
100644
|
File size:
442 bytes
|
Rev | Line | |
---|
[7137439] | 1 | import requests |
---|
| 2 | import unittest |
---|
| 3 | |
---|
| 4 | class TestGetClientsMethods(unittest.TestCase): |
---|
| 5 | |
---|
| 6 | def setUp(self): |
---|
| 7 | self.url = 'http://localhost:8888/clients' |
---|
| 8 | |
---|
| 9 | def test_get(self): |
---|
| 10 | returned = requests.get(self.url) |
---|
| 11 | self.assertEqual(returned.status_code, 200) |
---|
| 12 | |
---|
| 13 | def test_post(self): |
---|
| 14 | returned = requests.post(self.url) |
---|
| 15 | self.assertEqual(returned.status_code, 404) |
---|
| 16 | |
---|
| 17 | if __name__ == '__main__': |
---|
| 18 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.