Skip to content

Commit

Permalink
minimize diff between branches
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Sep 17, 2019
1 parent a9bde01 commit 18316bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
8 changes: 3 additions & 5 deletions test/simple_http_requests_test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/usr/bin/env python3

import http.client as httplib
import time
import unittest

import time

class TestSimpleHttpRequests(unittest.TestCase):
def setUp(self):
Expand Down Expand Up @@ -58,7 +57,7 @@ def test_http_echo1(self):
self.assertEqual(test_content.encode(), response.read())

def test_http_echo2(self):
test_content = "THIS is A test" * 1000 # make sure to exceed MTU
test_content = "THIS is A test"*1000 # make sure to exceed MTU
self.conn.request("POST", "/http_body_echo", test_content)
response = self.conn.getresponse()
self.assertEqual(200, response.status)
Expand Down Expand Up @@ -103,8 +102,7 @@ def test_directory_listing_from_filesystem(self):
response = self.conn.getresponse()
self.assertEqual(200, response.status)


if __name__ == '__main__':
time.sleep(1) # ensure server is up
time.sleep(1) # ensure server is up

unittest.main()
12 changes: 4 additions & 8 deletions test/websocket_test.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
#!/usr/bin/env python3

import time
import unittest

import websocket

import unittest
import time

class TestWebsocket(unittest.TestCase):
def setUp(self):
self.ws = websocket.create_connection(
"ws://localhost:9849/websocket_echo")
self.ws = websocket.create_connection("ws://localhost:9849/websocket_echo")

def tearDown(self):
self.ws.close()
Expand All @@ -32,8 +29,7 @@ def test_ok(self):
self.assertEqual(10, pong_echo.opcode)
self.assertEqual(b"test pong", pong_echo.data)


if __name__ == '__main__':
time.sleep(1) # ensure server is up
time.sleep(1) # ensure server is up

unittest.main()

0 comments on commit 18316bd

Please sign in to comment.