diff --git a/test/static/ssh_server.png b/test/static/ssh_server.png new file mode 100644 index 0000000..f79c801 Binary files /dev/null and b/test/static/ssh_server.png differ diff --git a/test/test.py b/test/test.py index 649cd9c..76c04d0 100644 --- a/test/test.py +++ b/test/test.py @@ -299,6 +299,16 @@ class WebAppTest(unittest.TestCase): self.assertIn('SAME', r.text) os.unlink('data.raw') + def testStatic(self): + r = requests.get("http://localhost:8002/static?fname=ssh_server.png", auth=self.auth_user) + self.assertEquals(r.status_code, 200) + f_served = b'' + for c in r.iter_content(): + f_served += c + + f_orig = file('static/ssh_server.png', 'rb').read() + self.assertEquals(f_orig, f_served) + if __name__ == '__main__': import coverage diff --git a/test/test_webapp.json b/test/test_webapp.json index 2ec4fa9..c0de57f 100644 --- a/test/test_webapp.json +++ b/test/test_webapp.json @@ -4,6 +4,7 @@ "admin": "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918", "user": "04f8996da763b7a969b1028ee3007569eaf3a635486ddab211d512c85b9df8fb" }, + "static_dir": "static", "forms": [ { "name": "admin_only",