Add skeleton for backend tests and tests for authentication and swagger doc#27
Conversation
|
I left a few comments, but looks great to me as is! |
| TEST_DIR = tempfile.TemporaryDirectory() | ||
| TEST_DB = os.path.join(TEST_DIR.name, "test.db") | ||
| config.sqlite.DB_URL = f"sqlite:///{TEST_DB}" | ||
| config.sqlite.DB_FILENAME = TEST_DB |
There was a problem hiding this comment.
This looks good to me, or at least I can't see any reason not to do it like this.
Just some random musing: We could have some abstraction around accessing config files. Like a class that would accept argument (or maybe check environment variable?) on init to read from either a prod config, or test config, etc. then have methods for accessing config values. Probably overkill at this point.
There was a problem hiding this comment.
I'm liking this idea of wrapping things in a class/function. Will ponder that and chat w/ Maria today about how she used to use multiple files.
Looks good to me! Another way I can think of is:
It adds an extra step in the dev setup and server setup (we did this at my previous job), not sure if that's needed for our group. |
I think that would be great - but you'll need to teach us how to maintain this setup 🙂 |
8e93ef1
|
@hattifnatt4r added the CI definition for this server that are passing: If you're cool with this change, I'd say we merge this and then can discuss if we want to rework how the config is imported. |
Sure that should be good, thank you! |
hattifnatt4r
left a comment
There was a problem hiding this comment.
Looks good to me, thank you!
This is what I think should be the last step to finish off #2 for user authentication.
I made a few restructuring changes like moving the sqlite setup to a package so I could call it from Python.
Let me know what y'all think!
2 big questions I had
DB_FILENAME, DB_URLinconftest.pylook ok? Any other suggestions?