def test_verb_put_not_existing(self):
        apimgr = self.create_mgr()
        apimgr.add(SqlAlchemyEndpoint(self.db, self.Book, ['title']))

        put_id = 999
        new_title = 'new title'
        data_in = json.dumps(dict(title=new_title))
        response = self.client.put('/book/%s' % put_id, data=data_in)
        self.assertStatus(response, 201)
        new_book_id = int(re.sub('.*/', '', response.headers['Location']))
        book = self.Book.query.filter_by(id=put_id).first()
        self.assertEqual(put_id, new_book_id)
        self.assertEqual(book.title, new_title)
dataset/ETHPy150Open ahri/flask-snooze/tests/test_snooze_sqlalchemyendpoint.py/TestSnoozeHttp.test_verb_put_not_existing/original