-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make tests more terse + fix typing on
UniqueOpts
(#13)
I'm getting to a place soon where I'm going to have to add a new set of tests for asynchronous operations, so in preparation for that, here we go through and make the tests more terse in a few ways: * Remove time mocks for tests they're not needed (most of them). * Remove local variables that aren't needed (instead just use the value directly). i.e. `args` can just be `JobArgs()` values, `UniqueOpts` can just go right onto `InsertOpts`. * Replace the name `result` with the more specific `insert_res` (suggesting it's a result for an insert rather than an arbitrary result). Also found a bad value for `by_args` in one test and realized that it wasn't being detected because the fields on `UniqueOpts` didn't have type annotations on them. Add type annotations to make this impossible in the future.
- Loading branch information
Showing
3 changed files
with
62 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters