@@ -0,0 +1,1199 @@
+#!/usr/bin/env python3%0Aimport os%0Aimport unittest%0Aimport requests%0A%0ABASE_URL=%22http://localhost:5000%22%0A%0Aclass SchortFunctionalTestCase(unittest.TestCase):%0A%09def setUp(self):%0A%09%09# maybe later%0A%09%09pass%0A%0A%09def tearDown(self):%0A%09%09# maybe later%0A%09%09pass%0A%0A%09def assertPostReq(self, url, data = %7B%7D):%0A%09%09req = requests.post(url, data=data)%0A%09%09self.assertEqual(req.status_code, 200)%0A%09%09return req%0A%0A%09def assertGetReq(self, url, params = %7B%7D):%0A%09%09req = requests.get(url, params=params)%0A%09%09self.assertEqual(req.status_code, 200)%0A%09%09return req%0A%0A%09def test_entry_page(self):%0A%09%09req = self.assertGetReq(BASE_URL + %22/%22)%0A%0A%09def test_custom_creation(self):%0A%09%09req = self.assertPostReq(BASE_URL + %22/%22, data=%7B%22url%22 : %22https://github.com/sqozz/schort%22, %22wishId%22 : %22custom_user_supplied_url%22%7D)%0A%0A%09def test_easy_api(self):%0A%09%09'''%0A%09%09Test if the api is intuitive/easy to implement%0A%09%09%0A%09%09While creating the custom_creation test, out of pure laziness, I left out the whishId parameter.%0A%09%09For intuitive use of the API from a script, this shouldn't be neccessary.%0A%09%09'''%0A%09%09req = self.assertPostReq(%22http://localhost:5000/%22, data=%7B%22url%22 : %22https://github.com/sqozz/schort%22%7D)%0A%0A%0Aif __name__ == '__main__':%0A%09unittest.main()%0A%0A# vim: noexpandtab:ts=2:sw=2:sts=2%0A

Add simple function tests