import lamindb_setup as ln_setup
Check current user.
ln_setup.login("testuser2")
assert ln_setup.settings.user.handle == "testuser2"
logout and check that the user info was updated.
ln_setup.logout()
assert ln_setup.settings.user.handle == "anonymous"
Init a local instance anonymously.
!lamin disconnect
!lamin init --storage ./test-anonymous-init --schema bionty
Load the instance and check.
ln_setup.load("test-anonymous-init")
assert ln_setup.settings.instance.name == "test-anonymous-init"
assert ln_setup.settings.instance.owner == "anonymous"
Clean up.
ln_setup.delete("test-anonymous-init", force=True)
ln_setup.login("testuser2")