-
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from peopledoc/composition-postgres-142
Composition postgres 142
- Loading branch information
Showing
37 changed files
with
567 additions
and
537 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
Test your code that uses Procrastinate | ||
-------------------------------------- | ||
|
||
Procrastinate defines an `InMemoryJobStore` that will speed up your tests, | ||
Procrastinate defines an `InMemoryConnector` that will speed up your tests, | ||
remove dependency to PostgreSQL and allow you to have tasks run in a | ||
controlled way. | ||
|
||
To use it, you can do:: | ||
|
||
app = procrastinate.App(job_store=procrastinate.testing.InMemoryJobStore()) | ||
app = procrastinate.App(connector=procrastinate.testing.InMemoryConnector()) | ||
|
||
# Run the jobs your tests created, then stop | ||
# the worker: | ||
app.run_worker(only_once=True) | ||
|
||
# See the jobs created: | ||
print(app.job_store.jobs) | ||
print(app.connector.jobs) | ||
|
||
# Reset the store between tests: | ||
app.job_store.reset() | ||
app.connector.reset() |
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
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
Oops, something went wrong.