-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
Signed-off-by: pstlouis <[email protected]>
Signed-off-by: pstlouis <[email protected]>
There was a problem hiding this 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.
server/tests/test_core.py
Outdated
import json | ||
import uuid | ||
|
||
def test_storage(): |
There was a problem hiding this comment.
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]>
Signed-off-by: pstlouis <[email protected]>
Signed-off-by: pstlouis <[email protected]>
Signed-off-by: pstlouis <[email protected]>
There was a problem hiding this 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' |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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]>
Addresses #78