def test_create_shift(client): shift = Shift( location="Dam Trail", start_time=datetime(2021, 1, 1, 14, 0), end_time=datetime(2021, 1, 1, 15, 30), ) assert shift.location == "Dam Trail" shift.save() assert (Shift.objects().order_by('-id').first() .location == "Dam Trail")
def test_create_shift(client): shift = Shift(location="UConn", datetime=datetime.now) assert shift.location == "UConn" shift.save() assert (Shift.objects().order_by('-id').first().location == "UConn")