-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a router and some intelligence to johnny's settings file to autom…
…atically set up MULTIDB tests if you have multiple databases configured; also added a convenience decorator that shows johnny's hit/miss signals, useful for debugging failing tests or even examining johnny's operation
- Loading branch information
Showing
4 changed files
with
51 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# routers for johnny's tests | ||
class MultiSyncedRouter(object): | ||
def db_for_read(self, *args, **kwargs): return None | ||
def db_for_write(self, *args, **kwargs): return None | ||
def allow_relation(self, *args, **kwargs): return None | ||
def allow_sync_db(self, db, model): | ||
return True |
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