Browse Source

add cgit test

Larry Fox 10 years ago
parent
commit
e67ef75d63
1 changed files with 14 additions and 0 deletions
  1. 14
    0
      tests.py

+ 14
- 0
tests.py View File

122
             r.content
122
             r.content
123
         )
123
         )
124
 
124
 
125
+    def test_cgit_http(self):
126
+        """CGit web interface is displaying home page"""
127
+        r = requests.get('http://git.' + TEST_SERVER, verify=False)
128
+
129
+        # We should be redirected to https
130
+        self.assertEquals(r.history[0].status_code, 301)
131
+        self.assertEquals(r.url, 'https://git.' + TEST_SERVER + '/')
132
+
133
+        # 200 - We should be at the repository page
134
+        self.assertEquals(r.status_code, 200)
135
+        self.assertIn(
136
+            'git repository',
137
+            r.content
138
+        )
125
 
139
 
126
 class IRCTests(unittest.TestCase):
140
 class IRCTests(unittest.TestCase):
127
     def test_irc_auth(self):
141
     def test_irc_auth(self):

Loading…
Cancel
Save