Last change
on this file 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
|
Line | |
---|
1 | # |
---|
2 | # Copyright (C) 2020-2021 Soleta Networks <info@soleta.eu> |
---|
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 |
---|
6 | # Free Software Foundation; either version 3 of the License, or |
---|
7 | # (at your option) any later version. |
---|
8 | |
---|
9 | from server import Server |
---|
10 | from client import Client |
---|
11 | import unittest |
---|
12 | |
---|
13 | class TestRunScheduleMethods(unittest.TestCase): |
---|
14 | |
---|
15 | def test_get(self): |
---|
16 | req = 'GET /run/schedule HTTP/1.0\r\nContent-Length: 0'+ \ |
---|
17 | '\r\nContent-Type: application/json\r\n\r\n' |
---|
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 | |
---|
27 | if __name__ == '__main__': |
---|
28 | unittest.main() |
---|
Note: See
TracBrowser
for help on using the repository browser.