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 # Same directory
|
|
11 def test_01_hidden(self):
|
|
12 response = requests.get("http://localhost:{0}/hidden.pspx".format(self.port))
|
|
13 self.assertEqual(response.status_code, 404)
|
|
14
|
|
15 # Relative, with .
|
|
16 def test_02_not_hidden(self):
|
|
17 response = requests.get("http://localhost:{0}/nothidden.pspx".format(self.port))
|
|
18 self.assertEqual(response.status_code, 200)
|
|
19
|
|
20 # Relative, with ..
|
|
21 def test_03_forward(self):
|
|
22 response = requests.get("http://localhost:{0}/forward.pspx".format(self.port))
|
|
23 self.assertEqual(response.status_code, 200)
|
|
24 self.assertTrue("Hello, World (Hidden)" in response.text)
|