예제 #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)
예제 #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)
예제 #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')
예제 #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')
예제 #5
0
파일: view.py 프로젝트: wkral/scrwall.com
 def get(self, wall_id):
     wall = walls.fetch(wall_id)
     if wall:
         self.respond('wall.html', {'wall': wall})
     else:
         self.respond_not_found()
예제 #6
0
 def test_find_wall(self):
     w = walls.fetch(self.wall.unique_id)
     assert self.wall.name == w.name
예제 #7
0
 def get(self, wall_id):
     w = walls.fetch(wall_id)
     if w:
         self.respond_json(w)
     else:
         self.respond_not_found()
예제 #8
0
 def get(self, wall_id):
     w = walls.fetch(wall_id)
     if w:
         self.respond_json(w)
     else:
         self.respond_not_found()
예제 #9
0
 def test_find_wall(self):
     w = walls.fetch(self.wall.unique_id)
     assert self.wall.name == w.name
예제 #10
0
파일: view.py 프로젝트: wkral/scrwall.com
 def get(self, wall_id):
     wall = walls.fetch(wall_id)
     if wall:
         self.respond('wall.html', {'wall': wall})
     else:
         self.respond_not_found()