71
|
1 # I m p o r t s
|
|
2
|
|
3 import os, sys
|
|
4 import requests
|
|
5 from .. import ServerFixture, RoutesFixture
|
|
6
|
|
7 # C l a s s e s
|
|
8
|
|
9 class Fixture01(RoutesFixture):
|
|
10 def test_01_good(self):
|
|
11 response = requests.get("http://localhost:{0}/good.pspx".format(self.port))
|
|
12 self.assertEqual(response.status_code, 200)
|
|
13 self.assertTrue("The current time on the server is" in response.text)
|
|
14
|
|
15 def test_02_bad(self):
|
|
16 response = requests.get("http://localhost:{0}/bad.pspx".format(self.port))
|
|
17 self.assertEqual(response.status_code, 404)
|
|
18
|
|
19 def test_03_bad(self):
|
|
20 response = requests.get("http://localhost:{0}/bad2.pspx".format(self.port))
|
|
21 self.assertEqual(response.status_code, 500)
|