self.conn.request('GET', '/day?date=3000-01-01')
self.assertEqual(self.conn.getresponse().status, 200)
self.conn.request('GET', '/day?date=FOO')
- self.assertEqual(self.conn.getresponse().status, 401)
+ self.assertEqual(self.conn.getresponse().status, 400)
self.conn.request('GET', '/calendar')
self.assertEqual(self.conn.getresponse().status, 200)
self.conn.request('GET', '/calendar?start=&end=')
self.conn.request('GET', '/calendar?start=2024-01-01&end=2025-01-01')
self.assertEqual(self.conn.getresponse().status, 200)
self.conn.request('GET', '/calendar?start=foo')
- self.assertEqual(self.conn.getresponse().status, 401)
+ self.assertEqual(self.conn.getresponse().status, 400)
body=encoded_form_data, headers=headers)
self.assertEqual(self.conn.getresponse().status, expect)
form_data = {'title': 'foo', 'description': 'foo', 'effort': 1.0}
- post_data_to_expect(form_data, '/process?id=FOO', 401)
+ post_data_to_expect(form_data, '/process?id=FOO', 400)
form_data['effort'] = 'foo'
- post_data_to_expect(form_data, '/process?id=', 401)
+ post_data_to_expect(form_data, '/process?id=', 400)
form_data['effort'] = None
- post_data_to_expect(form_data, '/process?id=', 401)
+ post_data_to_expect(form_data, '/process?id=', 400)
form_data = {'title': None, 'description': 1, 'effort': 1.0}
post_data_to_expect(form_data, '/process?id=', 302)
retrieved = Process.by_id(self.db_conn, 1)
self.conn.request('GET', '/process?id=0')
self.assertEqual(self.conn.getresponse().status, 200)
self.conn.request('GET', '/process?id=FOO')
- self.assertEqual(self.conn.getresponse().status, 401)
+ self.assertEqual(self.conn.getresponse().status, 400)
self.conn.request('GET', '/processes')
self.assertEqual(self.conn.getresponse().status, 200)