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')
def post(self): wall = walls.create() self.redirect('/c/%s' % wall.unique_id)
def setup(self): helper.clean_db() for i in range(10): walls.create(str(i)) eq_(len(Wall.all().fetch(100)), 10)
def setup(self): self.wall = walls.create(WALL_NAME)
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)
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
def setup(self): self.wall = walls.create(WALL_NAME) self.url = '/res/collections/%s' % self.wall.unique_id