diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2019-11-13 12:57:57 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-11-13 14:15:56 +0100 |
commit | 65cc7c17e231ed10b93dce6e0e8e998f66ba0212 (patch) | |
tree | dfa7c41c68dc98612fc4c2b5e1a618a32a63d5fb /tests/units/test_0008_post_reboot.py | |
parent | 6c91d147c1c31a7fa78f2721e1c963500a49084d (diff) |
#915 Extend REST API POST no payload tests to all remaining tests.
This patch extends tests for requests without any payload in the following REST
API POST functions:
- /clients
- /wol
- /shell/run
- /shell/output
- /session
- /poweroff
- /reboot
- /stop
- /refresh
- /hardware
- /software
Diffstat (limited to 'tests/units/test_0008_post_reboot.py')
-rw-r--r-- | tests/units/test_0008_post_reboot.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/units/test_0008_post_reboot.py b/tests/units/test_0008_post_reboot.py index 5ac4dc2..5d4ae06 100644 --- a/tests/units/test_0008_post_reboot.py +++ b/tests/units/test_0008_post_reboot.py @@ -12,6 +12,10 @@ class TestPostRebootMethods(unittest.TestCase): returned = requests.post(self.url, headers=self.headers, json=self.json) self.assertEqual(returned.status_code, 200) + def test_no_payload(self): + returned = requests.post(self.url, headers=self.headers, json=None) + self.assertEqual(returned.status_code, 400) + def test_get(self): returned = requests.get(self.url, headers=self.headers) self.assertEqual(returned.status_code, 405) |