Drkcore

10 03 2012 Python Flask Tweet

FlaskのテストでAssertionError: Popped wrong request context.

Flask-Testingでテストを書いていて

@app.route('/json/tags')
@cache.cached(timeout=600)

みたいにキャッシュしているurlにgetすると

def test_get_json_tags(self):
    response = self.client.get("/json/tags")
    self.assert200(response)

タイトルのように

AssertionError: Popped wrong request context.

って怒られるんだが、どうすればいいのかわからない。

あと、テストブームが来たのでPython Testing: Beginner's Guideを注文してしまった。

ProductName Python Testing: Beginner's Guide
Daniel Arbuckle
Packt Publishing / 3220円 ( 2010-01-31 )


About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021