{"html_url": "https://github.com/simonw/datasette/issues/580#issuecomment-554109342", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/580", "id": 554109342, "node_id": "MDEyOklzc3VlQ29tbWVudDU1NDEwOTM0Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-14T22:25:24Z", "updated_at": "2019-11-14T22:25:24Z", "author_association": "OWNER", "body": "I needed this again today for `datasette-template-sql`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 502355384, "label": "Testing utilities should be available to plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/580#issuecomment-554119604", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/580", "id": 554119604, "node_id": "MDEyOklzc3VlQ29tbWVudDU1NDExOTYwNA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-14T22:51:00Z", "updated_at": "2019-11-14T22:51:00Z", "author_association": "OWNER", "body": "One thing that would be useful is a way of constructing a `Datasette()` instance (and accompanying `TestClient`) which is attached to an in-memory database that the test itself can manipulate. This would make it trivial to run tests against hypothetical database tables - those tables could be created using `sqlite-utils` directly against the in-memory database that's being manipulated by the system-under-test.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 502355384, "label": "Testing utilities should be available to plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/580#issuecomment-554446317", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/580", "id": 554446317, "node_id": "MDEyOklzc3VlQ29tbWVudDU1NDQ0NjMxNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-11-15T17:11:02Z", "updated_at": "2019-11-15T17:11:02Z", "author_association": "OWNER", "body": "Here's where I copied the testing utilities into `datasette-template-sql` - very slightly modified from the utilities in `datasette-atom`: https://github.com/simonw/datasette-template-sql/blob/0ef0c7304bb5e658723e229d3ee463b9a76058f9/tests/utils.py", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 502355384, "label": "Testing utilities should be available to plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/580#issuecomment-561481377", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/580", "id": 561481377, "node_id": "MDEyOklzc3VlQ29tbWVudDU2MTQ4MTM3Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-12-04T05:18:25Z", "updated_at": "2019-12-04T05:18:25Z", "author_association": "OWNER", "body": "`datasette-atom` shipped with a copy of these classes too: https://github.com/simonw/datasette-atom/blob/c2e84207fccff0582d7152f3966dd2952fb0b74f/tests/utils.py", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 502355384, "label": "Testing utilities should be available to plugins"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/580#issuecomment-592395768", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/580", "id": 592395768, "node_id": "MDEyOklzc3VlQ29tbWVudDU5MjM5NTc2OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-02-28T07:58:46Z", "updated_at": "2020-02-28T07:58:46Z", "author_association": "OWNER", "body": "I don't think this is needed any more - I've found a really nice pattern for testing plugins using `httpx` instead, e.g. https://github.com/simonw/datasette-mask-columns/blob/f6f08ce21bdfc2731a02c42e1c9e25b4df769292/tests/test_mask_columns.py", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 502355384, "label": "Testing utilities should be available to plugins"}, "performed_via_github_app": null}