mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-06 05:30:57 +00:00
@@ -12,16 +12,16 @@ class GraphAPITest(APITest):
|
||||
def check(self):
|
||||
resp = self.get("/api/graph.png")
|
||||
self.check_equal(resp.headers["Content-Type"], "image/png")
|
||||
self.check_equal(resp.content[:4], '\x89PNG')
|
||||
self.check_equal(resp.content[:4], b'\x89PNG')
|
||||
|
||||
self.check_equal(self.post("/api/repos", json={"Name": "xyz", "Comment": "fun repo"}).status_code, 201)
|
||||
resp = self.get("/api/graph.svg")
|
||||
self.check_equal(resp.headers["Content-Type"], "image/svg+xml")
|
||||
self.check_equal(resp.content[:4], '<?xm')
|
||||
self.check_equal(resp.content[:4], b'<?xm')
|
||||
|
||||
resp = self.get("/api/graph.dot")
|
||||
self.check_equal(resp.headers["Content-Type"], "text/plain; charset=utf-8")
|
||||
self.check_equal(resp.content[:13], 'digraph aptly')
|
||||
self.check_equal(resp.content[:13], b'digraph aptly')
|
||||
|
||||
# basic test of layout:
|
||||
# horizontal should be wider than vertical
|
||||
|
||||
Reference in New Issue
Block a user