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
class TestRunner(runner.DiscoverRunner): | |
""" When migrations are disabled for the test runner, the `pre_migrate` signal | |
does not emit. So we need another hook for installing the extension. Prior to | |
Django 1.9, the `pre_syncdb` signal worked for that. | |
""" | |
def setup_databases(self, **kwargs): | |
""" | |
Always create PostgreSQL HSTORE extension if it doesn't already exist | |
on the database before syncing the database. Requires PostgreSQL >= 9.1 |