{"title":"<Python, flask> test_client()","provider_url":"https://hatena.blog","blog_title":"\u306d\u3053\u3086\u304d\u306e\u30e1\u30e2","published":"2017-12-11 22:05:20","author_name":"nekoyukimmm","image_url":null,"author_url":"https://blog.hatena.ne.jp/nekoyukimmm/","width":"100%","height":"190","url":"https://nekoyukimmm.hatenablog.com/entry/2017/12/11/220520","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnekoyukimmm.hatenablog.com%2Fentry%2F2017%2F12%2F11%2F220520\" title=\"&lt;Python, flask&gt; test_client() - \u306d\u3053\u3086\u304d\u306e\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","description":"Flask\u3055\u3093\u3092\u3084\u3063\u3066\u3044\u3066\u3001app.app_context()\u3092\u3084\u308b\u304c\u3044\u3044\u304c\u3001 \u5b9f\u969b\u306e\u52d5\u4f5crequest\u306b\u5bfe\u3059\u308b\u5fdc\u7b54\u3092\u78ba\u8a8d\u3059\u308b\u3044\u3044\u65b9\u6cd5\u304c\u306a\u3044\u304b\u3068\u601d\u3063\u3066\u3044\u305f\u3089\u3001\u3042\u308a\u307e\u3057\u305f\u3002 \u3055\u3059\u304c\u3063\u3059\u3002 app.test_client()\u3089\u3057\u3044\u3063\u3059\u3002 \u3053\u306e\u307e\u3048\u3001\u304b\u308a\u304b\u308a\u4f5c\u3063\u305f\u30b9\u30af\u30ea\u30d7\u30c8\uff08\u4e0b\uff09\u3067\u3061\u3068\u5b9f\u9a13\u3002 github.com In [1]: import restapi In [3]: restapi.db.create_all() In [5]: app = restapi.app.test_client() In [6]: type(app) Out[6]: flask.testing.FlaskClien\u2026","type":"rich","blog_url":"https://nekoyukimmm.hatenablog.com/","categories":["Python","flask"]}