SL
Size: a a a
SL
А
SL
СС
СС
int(os.environ.get('PYTEST_XDIST_WORKER', 'gw0').replace('gw', ''))А
АК
А
А
TU
IS
IS
А
TU
B
P
TU
class Data():
pass
class App(Service, Helper):
def __init__(self, options):
self.options = options
self.restapi = RestApi(self.options)
self.data = Data()
---
@pytest.fixture(scope="session")
def api(request):
app = App(options=options, login=login, password=password)
yield app
---
@pytest.fixture()
def create_foo(api):
resp = api.restapi.post(param="foo")
api.data.foo_id = resp.json()["id"]
yield app
---
def test_1(api, create_foo):
resp = api.restapi.get(endpoint="foo", id=api.data.foo_id)
assert len(resp.json()) > 0
СС
А
TU