Beispiel #1
0
 def test_add_two_urls(self):
     walls.add_url(self.wall.unique_id, URL1)
     walls.add_url(self.wall.unique_id, URL2)
     w = walls.fetch(self.wall.unique_id)
     eq_(w.items.count(), 2)
     eq_(w.items[0].url, URL1)
     eq_(w.items[1].url, URL2)
Beispiel #2
0
 def test_add_two_urls(self):
     walls.add_url(self.wall.unique_id, URL1)
     walls.add_url(self.wall.unique_id, URL2)
     w = walls.fetch(self.wall.unique_id)
     eq_(w.items.count(), 2)
     eq_(w.items[0].url, URL1)
     eq_(w.items[1].url, URL2)
Beispiel #3
0
 def put(self, wall_id):
     try:
         wall_obj = json.loads(self.request.body)
         wall = walls.fetch(wall_id)
         wall.name = wall_obj['name']
         wall.name_set = True
         wall.put()
         self.respond_no_content()
     except ValueError:
         self.respond_bad_request('Request did not contain valid JSON')
Beispiel #4
0
 def put(self, wall_id):
     try:
         wall_obj = json.loads(self.request.body) 
         wall = walls.fetch(wall_id)
         wall.name = wall_obj['name']
         wall.name_set = True
         wall.put()
         self.respond_no_content()
     except ValueError:
         self.respond_bad_request('Request did not contain valid JSON')
Beispiel #5
0
 def get(self, wall_id):
     wall = walls.fetch(wall_id)
     if wall:
         self.respond('wall.html', {'wall': wall})
     else:
         self.respond_not_found()
Beispiel #6
0
 def test_find_wall(self):
     w = walls.fetch(self.wall.unique_id)
     assert self.wall.name == w.name
Beispiel #7
0
 def get(self, wall_id):
     w = walls.fetch(wall_id)
     if w:
         self.respond_json(w)
     else:
         self.respond_not_found()
Beispiel #8
0
 def get(self, wall_id):
     w = walls.fetch(wall_id)
     if w:
         self.respond_json(w)
     else:
         self.respond_not_found()
Beispiel #9
0
 def test_find_wall(self):
     w = walls.fetch(self.wall.unique_id)
     assert self.wall.name == w.name
Beispiel #10
0
 def get(self, wall_id):
     wall = walls.fetch(wall_id)
     if wall:
         self.respond('wall.html', {'wall': wall})
     else:
         self.respond_not_found()