def testSaveAnotherUsersPlace(self): setCurrentUser("*****@*****.**", "User1") register_new_user('User1') place1url = create_place("Test Place 1") save_place(place1url, name="This is a new place name") logoutCurrentUser() setCurrentUser("*****@*****.**", "User2") self.assertRaises(DataModelException, save_place, place1url, "Should Fail") register_new_user('User2') self.assertRaises(DataModelException, save_place, place1url, "Should Fail")
def testSavePlaceName(self): setCurrentUser("*****@*****.**", "User1") register_new_user('User1') place1url = create_place("Test Place 1") save_place(place1url, name="This is a new place name") self.assertEqual(get_place_properties(place1url)["name"], "This is a new place name")