-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
74 additions
and
129 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
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,33 +1,20 @@ | ||
import pytest | ||
from celery import Celery | ||
from pytest_lazyfixture import lazy_fixture | ||
|
||
from pytest_celery import CELERY_SETUP_WORKER | ||
from pytest_celery import CeleryTestWorker | ||
# from pytest_celery import CELERY_SETUP_WORKER | ||
# from pytest_celery import CeleryTestWorker | ||
from pytest_celery import CeleryWorkerContainer | ||
from tests.defaults import ALL_WORKERS_FIXTURES | ||
from tests.integration.conftest import IntegrationWorkerContainer | ||
|
||
|
||
@pytest.mark.parametrize("container", lazy_fixture(ALL_WORKERS_FIXTURES)) | ||
class test_celery_worker_container: | ||
def test_client(self, container: CeleryWorkerContainer): | ||
assert container.client | ||
assert container.client == container, "Check tests/conftest.py/WorkerContainer.client" | ||
assert container.client == container | ||
|
||
|
||
@pytest.mark.parametrize("node", [lazy_fixture(CELERY_SETUP_WORKER)]) | ||
class test_base_test_worker: | ||
def test_ready(self, node: CeleryTestWorker): | ||
assert node.ready() | ||
|
||
def test_app(self, node: CeleryTestWorker, celery_setup_app: Celery): | ||
assert node.app is celery_setup_app | ||
|
||
def test_wait_for_log(self, node: CeleryTestWorker): | ||
log = f"{IntegrationWorkerContainer.worker_name()}@{node.hostname()} v{node.version}" | ||
node.wait_for_log(log, "test_base_test_worker.test_wait_for_log") | ||
|
||
def test_assert_log_exists(self, node: CeleryTestWorker): | ||
log = f"{IntegrationWorkerContainer.worker_name()}@{node.hostname()} v{node.version}" | ||
node.assert_log_exists(log, "test_base_test_worker.test_assert_log_exists") | ||
# @pytest.mark.parametrize("node", [lazy_fixture(CELERY_SETUP_WORKER)]) | ||
# class test_base_test_worker: | ||
# def test_placeholder(self, node: CeleryTestWorker): | ||
# node = node |
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.