def test4(self): self.assertEqual(client(2000, True, None, None), 'test1\n' '[done]') def test4(self): self.assertEqual(client(2000, True, None, None), 'test0\n' '[done]') def test5(self): self.assertEqual(client(2000, False, 'asd', '12000'), p.print_help()) def test6(self): self.assertEqual(client(), p.print_help())
def test_zget1111(self): self.assertEqual(client(2000, True, None, '1111'), 'test1111\n[done]')
def test_post10000(self): self.assertEqual(client(2000, False, 'test10000', '10000'), '[done]')
def test_post9999(self): self.assertEqual(client(2000, False, 'test9999', '9999'), '[done]')
def test_zget2(self): self.assertEqual(client(2000, True, None, None), 'test0\n[done]')
def setUp(self): for i in range(100): client(2000, False, str(i), None)
def test_help0(self): self.assertEqual(client(2000), p.print_help())
def test_ascii_post(self): x = ''.join([chr(i) for i in range(32, 126)]) self.assertEqual(client(2000, False, x, None), '[done]')
def test_post_over_100(self): self.assertEqual(client(2000, False, '101', None), '')
def test_get_over_100(self): self.assertTrue(client(2000, True, None, None) != '101')
def test6(self): self.assertEqual(client(), p.print_help())
def test5(self): self.assertEqual(client(2000, False, 'asd', '12000'), p.print_help())
def test4(self): self.assertEqual(client(2000, True, None, None), 'test0\n' '[done]')
def test_zget9999(self): self.assertEqual(client(2000, True, None, '9999'), 'test9999\n[done]')
def test_help1_wrong_queue(self): self.assertEqual(client(2000, False, 'test', '10001'), p.print_help()) self.assertTrue(client(2000, True, None, '10001') != 'test')
def test_zget10000(self): self.assertEqual(client(2000, True, None, '10000'), 'test10000\n[done]')
def test_help2_post_exception(self): self.assertEqual(client(2000, False, 'test|||test', None), p.print_help())
def test_ascii_zget(self): x = ''.join([chr(i) for i in range(32, 126)]) self.assertEqual(client(2000, True, None, None), x + '\n[done]')
def test_post2(self): self.assertEqual(client(2000, False, 'test2', None), '[done]')
def tearDown(self): for i in range(99): client(2000, True, None, None)
def test3(self): self.assertEqual(client(2000, True, None, '1'), 'test2\n' '[done]')