|
@@ -0,0 +1,44 @@
|
|
1
|
+from tracim.tests import FunctionalTest
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+class TestDoc(FunctionalTest):
|
|
5
|
+
|
|
6
|
+ def test_index(self):
|
|
7
|
+ res = self.testapp.get('/api/v2/doc/', status=200)
|
|
8
|
+ assert res.content_type == 'text/html'
|
|
9
|
+
|
|
10
|
+ def test_spec_yml(self):
|
|
11
|
+ res = self.testapp.get('/api/v2/doc/spec.yml', status=200)
|
|
12
|
+ assert res.content_type == 'text/x-yaml'
|
|
13
|
+
|
|
14
|
+ def test_assets(self):
|
|
15
|
+ res = self.testapp.get(
|
|
16
|
+ '/api/v2/doc/favicon-32x32.png',
|
|
17
|
+ status=200,
|
|
18
|
+ )
|
|
19
|
+ assert res.content_type == 'image/png'
|
|
20
|
+ res = self.testapp.get(
|
|
21
|
+ '/api/v2/doc/favicon-16x16.png',
|
|
22
|
+ status=200
|
|
23
|
+ )
|
|
24
|
+ assert res.content_type == 'image/png'
|
|
25
|
+ res = self.testapp.get(
|
|
26
|
+ '/api/v2/doc/swagger-ui.js',
|
|
27
|
+ status=200
|
|
28
|
+ )
|
|
29
|
+ assert res.content_type == 'application/javascript'
|
|
30
|
+ res = self.testapp.get(
|
|
31
|
+ '/api/v2/doc/swagger-ui-standalone-preset.js',
|
|
32
|
+ status=200
|
|
33
|
+ )
|
|
34
|
+ assert res.content_type == 'application/javascript'
|
|
35
|
+ res = self.testapp.get(
|
|
36
|
+ '/api/v2/doc/swagger-ui-bundle.js',
|
|
37
|
+ status=200
|
|
38
|
+ )
|
|
39
|
+ assert res.content_type == 'application/javascript'
|
|
40
|
+ res = self.testapp.get(
|
|
41
|
+ '/api/v2/doc/swagger-ui.css',
|
|
42
|
+ status=200
|
|
43
|
+ )
|
|
44
|
+ assert res.content_type == 'text/css'
|