{"width":"100%","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/posturan/","image_url":null,"type":"rich","height":"190","url":"https://oboe2uran.hatenablog.com/entry/2023/10/29/215656","blog_title":"Oboe\u5439\u304d\u30d7\u30ed\u30b0\u30e9\u30de\u306e\u9ed9\u793a\u9332","author_name":"posturan","title":"mock-Alchemy\u3001pytest-sqlalchemy-mock \u3092\u4f7f\u308f\u306a\u3044\u3067\u30e2\u30c3\u30af\u3092\u4f5c\u308b","published":"2023-10-29 21:56:56","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Foboe2uran.hatenablog.com%2Fentry%2F2023%2F10%2F29%2F215656\" title=\"mock-Alchemy\u3001pytest-sqlalchemy-mock \u3092\u4f7f\u308f\u306a\u3044\u3067\u30e2\u30c3\u30af\u3092\u4f5c\u308b - Oboe\u5439\u304d\u30d7\u30ed\u30b0\u30e9\u30de\u306e\u9ed9\u793a\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","description":"pytest-mock \u3060\u3051\u3067\u9811\u5f35\u308b\u65b9\u6cd5\u4eca\u56de\u76ee\u7684\u306e\u5bfe\u8c61\u306e\u691c\u7d22\u30af\u30a8\u30ea'name'\u5217\u3092\u6307\u5b9a\u3057\u3066SQL\u306e\u7d50\u679c\u304b\u3089\uff11\u884c\u76ee\u306e\u7d50\u679c\u306e 'color'\u5217\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u30af\u30a8\u30ea \u306e\u30e1\u30bd\u30c3\u30c9\u304c\u3042\u308b\u3002 class Sample: def queryColor(self, name:str)->str: sfactory = sessionmaker(autocommit=False, autoflush=True, bind=engine) with sfactory() as session: sql = \"SELECT * FROM view_data WHERE name = '%s' ORDER BY po\u2026","version":"1.0","blog_url":"https://oboe2uran.hatenablog.com/","categories":["Python"]}