Ejemplo n.º 1
0
 def testGetMyPlaces(self):
     setupLotsOfPlaces()
     setCurrentUser("*****@*****.**", "User1")
     places_list = get_my_places()
     self.assertEqual(len(places_list), 14)
     setCurrentUser("*****@*****.**", "User2")
     places_list = get_my_places()
     self.assertEqual(len(places_list), 2)
Ejemplo n.º 2
0
 def testDeletePlace(self):
     setCurrentUser("*****@*****.**", "User1")
     register_new_user('User1')
     self.assertEquals(len(get_my_places()), 0)
     place1url = create_place("Test Place 1")
     self.assertEquals(len(get_my_places()), 1)
     delete_place(place1url)
     self.assertEquals(len(get_my_places()), 0)
Ejemplo n.º 3
0
 def testDeleteAnotherUsersPlace(self):
     setCurrentUser("*****@*****.**", "User1")
     register_new_user('User1')
     place1url = create_place("Test Place 1")
     setCurrentUser("*****@*****.**", "User2")
     register_new_user('User2')
     self.assertEquals(len(get_my_places()), 0)
     self.assertRaises(DataModelException, delete_place, place1url)
Ejemplo n.º 4
0
 def testAdminCreatePlace(self):
     create_place("Test Place 1")
     self.assertEquals(len(get_my_places()), 1)