| 59 | |
| 60 | @pytest.fixture(scope='session') |
| 61 | def celery_config(request): |
| 62 | config = { |
| 63 | 'broker_url': TEST_BROKER, |
| 64 | 'result_backend': TEST_BACKEND, |
| 65 | 'result_extended': True, |
| 66 | 'cassandra_servers': ['localhost'], |
| 67 | 'cassandra_keyspace': 'tests', |
| 68 | 'cassandra_table': 'tests', |
| 69 | 'cassandra_read_consistency': 'ONE', |
| 70 | 'cassandra_write_consistency': 'ONE', |
| 71 | } |
| 72 | try: |
| 73 | # To override the default configuration, create the integration-tests-config.json file |
| 74 | # in Celery's root directory. |
| 75 | # The file must contain a dictionary of valid configuration name/value pairs. |
| 76 | with open(str(request.config.rootdir / "integration-tests-config.json")) as file: |
| 77 | overrides = json.load(file) |
| 78 | config.update(overrides) |
| 79 | except OSError: |
| 80 | pass |
| 81 | return config |
| 82 | |
| 83 | |
| 84 | @pytest.fixture(scope='session') |