def setUp(self): self.config_file = tempfile.NamedTemporaryFile(delete=False) self.config_file.write('\n'.join([ 'TESTING = True', # 'CELERY_BROKER_URL = "amqp://"', ]).encode('utf-8')) self.config_file.close() os.environ['MARVIN_CONFIG_FILE'] = self.config_file.name from marvin.management import delete_streams_and_entries self.delete_streams_and_entries = delete_streams_and_entries fixtures.load(self.app, fixtures.COMPLETE)
def test_load_fixture(self): fixtures.load(self.app, fixtures.COMPLETE) with self.app.test_request_context(): self.assertTrue(len(Movie.query.all()) > 0) self.assertTrue(len(Stream.query.all()) > 0)
def setUp(self): fixtures.load(self.app, fixtures.COMPLETE)