def test_save_creates_space(self): space = Space(self.conn, 'not saved') self.assertFalse(space.persisted()) resp = space.save() self.assertIsInstance(resp, Space) self.assertTrue(space.persisted())
def test_space_is_persisted_if_id_present(self): space = Space(self.conn, 'saved', id=42) self.assertTrue(space.persisted())
def test_space_is_not_persisted(self): space = Space(self.conn, 'not saved') self.assertFalse(space.persisted())
def test_save_creates_space(self): space = Space(self.conn, 'not saved') self.assertFalse(space.persisted()) resp = space.save() self.assertIsInstance(resp, Space) self.assertTrue(space.persisted())
def test_space_is_persisted_if_id_present(self): space = Space(self.conn, 'saved', id=42) self.assertTrue(space.persisted())
def test_space_is_not_persisted(self): space = Space(self.conn, 'not saved') self.assertFalse(space.persisted())