def test_saves_event_if_event_is_not_already_stored(self): Brain.create(self.event) stored_event = Brain.read("223-unique-id") assert stored_event.title == "Cool event" assert stored_event.notification_sent == False assert str(stored_event.date) == str(self.event.date) assert str(stored_event.enrollment_date) == str(self.event.enrollment_date)
def test_can_update_event(self): Brain.create(self.event) self.event.title = "Updated event" Brain.update(self.event) assert Brain.read("223-unique-id").title == "Updated event"