source: ogClient-Git/tests/units/test_0006_run_schedule.py @ 5d79977

Last change on this file since 5d79977 was cb9edc8, checked in by OpenGnSys Support Team <soporte-og@…>, 4 years ago

ogClient is AGPLv3+

Update license header in files.

  • Property mode set to 100644
File size: 854 bytes
RevLine 
[8a9a32f]1#
[cb9edc8]2# Copyright (C) 2020-2021 Soleta Networks <info@soleta.eu>
[8a9a32f]3#
4# This program is free software: you can redistribute it and/or modify it under
5# the terms of the GNU Affero General Public License as published by the
[cb9edc8]6# Free Software Foundation; either version 3 of the License, or
7# (at your option) any later version.
[8a9a32f]8
9from server import Server
10from client import Client
11import unittest
12
13class TestRunScheduleMethods(unittest.TestCase):
14
15    def test_get(self):
[f86999d]16        req = 'GET /run/schedule HTTP/1.0\r\nContent-Length: 0'+ \
17              '\r\nContent-Type: application/json\r\n\r\n'
[8a9a32f]18        c = Client()
19        s = Server()
20        s.connect()
21        s.send(req)
22        client_response = s.recv()
23        s.stop()
24        c.stop()
25        self.assertRegex(client_response, '^HTTP/1.0 200 OK\r\n*')
26
27if __name__ == '__main__':
28    unittest.main()
Note: See TracBrowser for help on using the repository browser.