def test_lesson_create(self): s = req.Session() genned_text = gentext(6) data = {URL: genned_text, TYPE: 1, ID_PROJECT: 1, TITLE: genned_text} r = s.post(HOST + '/lesson', data=data) print(r.text) self.assertEqual(r.status_code, 200) self.assertIsNotNone(r.text)
def test_auth(self): s = req.Session() genned_data = gentext(6) data = {LOGIN: genned_data, PASSWORD: genned_data} r = s.post(HOST + '/auth', data=data) print(r.text) self.assertEqual(r.status_code, 200) self.assertIsNotNone(r.text)
def test_document_update(self): s = req.Session() genned_text = gentext(6) data = { PHOTO: 1, URL: genned_text, TYPE: 1, ID_PROJECT: 1, TITLE: genned_text } r = s.put(HOST + '/document/1', data=data) print(r.text) self.assertEqual(r.status_code, 200) self.assertIsNotNone(r.text)
def test_project_create(self): s = req.Session() genned_text = gentext(6) data = { TITLE: genned_text, DESCRIPTION: genned_text, NAME: genned_text, ID_USER: 1, CATEGORIES: [1, 2], BUDGET: 1600.99, RATE: 4.2 } r = s.get(HOST + '/category', data=data) print(r.text) self.assertEqual(r.status_code, 200) self.assertIsNotNone(r.text)
def test_project_update(self): s = req.Session() genned_text = gentext(6) data = { TITLE: genned_text, DESCRIPTION: genned_text, NAME: genned_text, PHOTO: genned_text, ID_USER: 1, CATEGORIES: [1, 2], BUDGET: 2303.15, RATE: 3.2 } r = s.put(HOST + '/project/1', data=data) print(r.text) self.assertEqual(r.status_code, 200) self.assertIsNotNone(r.text)