Mercurial > libervia-backend
diff tests/e2e/conftest.py @ 3498:d78b5eae912a
tests: update following names change
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 16 Apr 2021 18:32:34 +0200 |
parents | 7550ae9cfbac |
children | 4cd4922de876 |
line wrap: on
line diff
--- a/tests/e2e/conftest.py Fri Apr 16 18:32:16 2021 +0200 +++ b/tests/e2e/conftest.py Fri Apr 16 18:32:34 2021 +0200 @@ -26,7 +26,7 @@ from aiosmtpd.handlers import Message from email.message import EmailMessage import sh -from sh import jp +from sh import li import pytest @@ -35,7 +35,7 @@ BUF_SIZE = 65535 def __init__(self): - self.tmp_dir_obj = tempfile.TemporaryDirectory(prefix="sat_e2e_test_files_") + self.tmp_dir_obj = tempfile.TemporaryDirectory(prefix="libervia_e2e_test_files_") self.tmp_dir_path = Path(self.tmp_dir_obj.name) self.source_files = self.tmp_dir_path / "source" self.source_files.mkdir() @@ -157,7 +157,7 @@ profile = f"account{account_idx}{profile_suff}" profiles.append(profile) try: - jp.account.create( + li.account.create( f"account{account_idx}@server{server_idx}.test", "test", profile=profile, @@ -167,14 +167,14 @@ # this is the conlict exit code, this can happen when tests are run # inside a container when --keep-profiles is used with run_e2e.py. pass - jp.profile.modify(profile="account1", default=True, connect=True) - jp.profile.connect(profile="account1_s2", connect=True) + li.profile.modify(profile="account1", default=True, connect=True) + li.profile.connect(profile="account1_s2", connect=True) yield tuple(profiles) # This environment may be used during tests development - if os.getenv("SAT_TEST_E2E_KEEP_PROFILES") == None: + if os.getenv("LIBERVIA_TEST_E2E_KEEP_PROFILES") == None: for profile in profiles: - jp.account.delete(profile=profile, connect=True, force=True) - jp.profile.delete(profile, force=True) + li.account.delete(profile=profile, connect=True, force=True) + li.profile.delete(profile, force=True) @pytest.fixture(scope="class") @@ -183,25 +183,25 @@ Both nodes will be created with "account1" profile, named "test" and have an "open" access model. - One node will account1's PEP, the other one on pubsub.server1.test. + One node will be on account1's PEP, the other one on pubsub.server1.test. """ - jp.pubsub.node.create( + li.pubsub.node.create( "-f", "access_model", "open", node="test", profile="account1", connect=True ) - jp.pubsub.node.create( + li.pubsub.node.create( "-f", "access_model", "open", service="pubsub.server1.test", node="test", profile="account1" ) yield - jp.pubsub.node.delete( + li.pubsub.node.delete( node="test", profile="account1", connect=True, force=True ) - jp.pubsub.node.delete( + li.pubsub.node.delete( service="pubsub.server1.test", node="test", profile="account1", force=True