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

Last change on this file since e96e187 was f86999d, checked in by Alvaro Neira Ayuso <aneira@…>, 5 years ago

add space after Content-Length and Content-Type

ogAdmServer needs this space to work fine.

  • Property mode set to 100644
File size: 788 bytes
Line 
1#
2# Copyright (C) 2020 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, version 3.
7#
8
9from server import Server
10from client import Client
11import unittest
12
13class 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
27if __name__ == '__main__':
28    unittest.main()
Note: See TracBrowser for help on using the repository browser.