def test_checkin_fail_choice(self): bike = Bike.objects.get(name="1") make_ride(self.student, bike) body = "checkin PSA" expected = "Station not found" response = handle_checkin(self.student, body) print(expected, response) self.assertTrue(expected in response) self.assertLess(len(response), 161)
def test_checkin_success(self): bike = Bike.objects.get(name="1") make_ride(self.student, bike) body = "checkin rodin" expected = "You have successfully returned" response = handle_checkin(self.student, body) print(response) self.assertTrue(expected in response) self.assertLess(len(response), 161)