def save_updates_space(self): space = Space(self.conn, 'some name').save() self.assertEqual(space.name, 'some name') space.name = 'new name' space.save() self.assertEqual(self.conn.find_space('new_name').name, 'new name')
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())