tests.integration.test_url   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 13
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A TestURL.test_notexistent_url() 0 11 1
A TestURL.test_static_page() 0 6 1
1
"""
2
All other misc. URL-related integration tests.
3
"""
4
5
from . import integ_test_base
6
7
8
class TestURL(integ_test_base.IntegTestBase):
9
    def test_notexistent_url(self):
10
        # Uncomment the following line to preserve
11
        # test case output and other files (config, state, ect.)
12
        # in system temp folder.
13
        # self.set_delete_temp_folder(False)
14
15
        conn = self._get_connection()
16
        conn.request("GET", "/unicorn")
17
        res = conn.getresponse()
18
19
        self.assertEqual(404, res.status)
20
21
    def test_static_page(self):
22
        conn = self._get_connection()
23
        conn.request("GET", "/")
24
        res = conn.getresponse()
25
26
        self.assertEqual(200, res.status)
27