File: docs.py

package info (click to toggle)
aptly 1.6.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 49,928 kB
  • sloc: python: 10,398; sh: 252; makefile: 184
file content (17 lines) | stat: -rw-r--r-- 410 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from api_lib import APITest


class TaskAPITestSwaggerDocs(APITest):
    """
    GET /docs
    """

    def check(self):
        resp = self.get("/docs/doc.json")
        self.check_equal(resp.status_code, 200)

        resp = self.get("/docs/", allow_redirects=False)
        self.check_equal(resp.status_code, 301)

        resp = self.get("/docs/index.html")
        self.check_equal(resp.status_code, 200)