Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support copying individual profiles or a whole Store #159

Merged
merged 9 commits into from
Aug 10, 2023
Prev Previous commit
Next Next commit
fix signature for set_default_profile
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
  • Loading branch information
andrewwhitehead committed Aug 4, 2023
commit f593e186f0abd982dd378456254eea1f2415b731
1 change: 0 additions & 1 deletion wrappers/python/aries_askar/bindings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ async def store_set_default_profile(handle: StoreHandle, profile: str):
(StoreHandle, FfiStr),
handle,
profile,
return_type=StrBuffer,
)


Expand Down
4 changes: 2 additions & 2 deletions wrappers/python/aries_askar/store.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,9 @@ async def get_default_profile(self) -> str:
"""Accessor for the default profile name when the store is opened."""
return await bindings.store_get_default_profile(self._handle)

async def set_default_profile(self, profile: str) -> str:
async def set_default_profile(self, profile: str):
"""Setter for the default profile name when the store is opened."""
return await bindings.store_set_default_profile(self._handle, profile)
await bindings.store_set_default_profile(self._handle, profile)

async def remove_profile(self, name: str) -> bool:
"""Remove a profile from the store."""
Expand Down
1 change: 1 addition & 0 deletions wrappers/python/tests/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ async def test_profile(store: Store):
)
) == 0

assert (await store.get_default_profile()) != profile
await store.set_default_profile(profile)
assert (await store.get_default_profile()) == profile

Expand Down