home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 609461331

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/datasette/issues/716#issuecomment-609461331 https://api.github.com/repos/simonw/datasette/issues/716 609461331 MDEyOklzc3VlQ29tbWVudDYwOTQ2MTMzMQ== 9599 2020-04-05T18:31:32Z 2020-04-05T20:04:08Z OWNER

The test ended up being a bit fiddly - here it is:

https://github.com/simonw/datasette/blob/09253817dea3c131553494f9b2eb9c03f94ae761/tests/test_plugins.py#L266-L317

I used tmp_path_factory here because the tmpdir fixture I usually use isn't compatible with scope="session", and I wanted to only create those temporary plugins and templates directories once rather than create them for each run of the parametrized test function.

In writing this I realized that the name on the QueryView class wasn't being used, because that class is currently just used for its .data() method:

https://github.com/simonw/datasette/blob/09253817dea3c131553494f9b2eb9c03f94ae761/datasette/views/database.py#L27-L31

https://github.com/simonw/datasette/blob/07e208cc6d9e901b87552c1be2854c220b3f9b6d/datasette/views/table.py#L224-L227

So I removed the name = "query" line since it was misleading.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
594168758  
Powered by Datasette · Queries took 0.955ms · About: github-to-sqlite