Conversation
simonw
commented
Apr 26, 2024
Comment on lines
+14
to
+20
| def get_internal_database(ds): | ||
| if hasattr(ds, "get_internal_database"): | ||
| return ds.get_internal_database() | ||
| else: | ||
| return ds.get_database("_internal") | ||
|
|
||
|
|
Contributor
Author
There was a problem hiding this comment.
Bit of a gross hack here to get the internal database working in tests.
simonw
commented
Apr 26, 2024
Comment on lines
+99
to
+105
| plugin_config={ | ||
| "datasette-secrets": { | ||
| "database": "_internal", | ||
| "encryption-key": TEST_ENCRYPTION_KEY, | ||
| } | ||
| }, | ||
| permissions={"manage-secrets": {"id": "admin"}}, |
Contributor
Author
There was a problem hiding this comment.
Using this new feature in datasette-test:
simonw
commented
Apr 26, 2024
| @pytest.mark.asyncio | ||
| async def test_set_secret(ds, use_actors_plugin): | ||
| cookies = {"ds_actor": ds.client.actor_cookie({"id": "admin"})} | ||
| cookies = {"ds_actor": actor_cookie(ds, {"id": "admin"})} |
Contributor
Author
There was a problem hiding this comment.
Using this new feature in datasette-test:
simonw
commented
Apr 26, 2024
Comment on lines
+192
to
+194
| if hasattr(datasette, "actors_from_ids"): | ||
| actors = await datasette.actors_from_ids( | ||
| { |
Contributor
Author
There was a problem hiding this comment.
To compensate for datasette.actors_from_ids() not being in Datasette <1.0
Contributor
Author
|
Permission tests are failing for the 1.0a version: |
Contributor
Author
|
In the debugger for |
Contributor
Author
|
Why did this check fail? Here's why: That's configured to allow |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs: