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

Initial set of tests #84

Merged
merged 11 commits into from
Jan 9, 2025
Merged

Conversation

PatStLouis
Copy link
Contributor

@PatStLouis PatStLouis commented Jan 7, 2025

Addresses #78

Copy link
Contributor

@jamshale jamshale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good... I think you might as well add asynchronous testing support initially though.

https://pypi.org/project/pytest-asyncio/

import json
import uuid

def test_storage():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you not make this test async and await these asynchronous functions?

Signed-off-by: pstlouis <[email protected]>
Signed-off-by: pstlouis <[email protected]>
Signed-off-by: pstlouis <[email protected]>
Signed-off-by: pstlouis <[email protected]>
Signed-off-by: pstlouis <[email protected]>
@PatStLouis PatStLouis requested a review from jamshale January 8, 2025 20:36
Copy link
Contributor

@jamshale jamshale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One small comment.

server/config.py Outdated
@@ -11,13 +11,13 @@ class Settings(BaseSettings):
PROJECT_TITLE: str = "DID WebVH Server"
PROJECT_VERSION: str = "v0"

SECRET_KEY: str = os.environ["SECRET_KEY"]
SECRET_KEY: str = os.environ.get("SECRET_KEY", None) or 's3cret'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can put the or value as the default (None). If you use get without a second param then the result is None.

ie: os.environ.get("SECRET_KEY", 's3cret')

Same with the other configs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why but this is how I had it and for some reason it doesn't pickup the 'localhost' value when I set it up like that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm, had a local .env file with empty strings laying around

Signed-off-by: pstlouis <[email protected]>
@PatStLouis PatStLouis merged commit 0c79583 into decentralized-identity:main Jan 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants