Exemplo n.º 1
0
 def post(self):
     try:
         wall_obj = json.loads(self.request.body)
         wall = walls.create(wall_obj['name'])
         self.respond_created(wall_uri(wall))
     except ValueError:
         self.respond_bad_request('Request did not contain valid JSON')
Exemplo n.º 2
0
 def post(self):
     try:
         wall_obj = json.loads(self.request.body)
         wall = walls.create(wall_obj['name'])
         self.respond_created(wall_uri(wall))
     except ValueError:
         self.respond_bad_request('Request did not contain valid JSON')
Exemplo n.º 3
0
 def post(self):
     wall = walls.create()
     self.redirect('/c/%s' % wall.unique_id)
Exemplo n.º 4
0
 def setup(self):
     helper.clean_db()
     for i in range(10):
         walls.create(str(i))
     eq_(len(Wall.all().fetch(100)), 10)
Exemplo n.º 5
0
 def setup(self):
     self.wall = walls.create(WALL_NAME)
Exemplo n.º 6
0
def test_get_collection():
    wall = walls.create("My collection")
    response = app.get('/c/%s' % wall.unique_id)
    assert_status(response, 200)
    assert 'My collection' in str(response)
    assert 'Probably our fault' in str(response)
Exemplo n.º 7
0
 def setup(self):
     self.wall = walls.create(WALL_NAME)
Exemplo n.º 8
0
 def setup(self):
     helper.clean_db()
     for i in range(10):
         walls.create(str(i))
     eq_(len(Wall.all().fetch(100)), 10)
Exemplo n.º 9
0
 def post(self):
     wall = walls.create()
     self.redirect('/c/%s' % wall.unique_id)
Exemplo n.º 10
0
 def setup(self):
     self.wall = walls.create(WALL_NAME)
     self.item = walls.add_url(self.wall.unique_id,
                               'http://www.testurl.com')
     self.url = '/res/collections/%s' % self.wall.unique_id
Exemplo n.º 11
0
 def setup(self):
     self.wall = walls.create(WALL_NAME)
     self.url = '/res/collections/%s' % self.wall.unique_id
Exemplo n.º 12
0
 def setup(self):
     self.wall = walls.create(WALL_NAME)
     self.item = walls.add_url(self.wall.unique_id, 'http://www.testurl.com')
     self.url = '/res/collections/%s' % self.wall.unique_id
Exemplo n.º 13
0
 def setup(self):
     self.wall = walls.create(WALL_NAME)
     self.url = '/res/collections/%s' % self.wall.unique_id