What's the deal with Deno? We talk with a major contributor to find out. Listen now.

Hot answers tagged

3

You can create have multiple implementations of your client object. import abc class MyServiceClient(abc.ABC): @abc.abstractmethod def get_item(self, id): pass class MyServiceClientStub(MyServiceClient): def get_item(self, id): return Item(1) class RealMyServiceClient(MyServiceClient): def get_item(self, id): # ...


1

I'd also take into account how much code the "creating new user" part is. In pytest/Python, it really boils down to just one line of code, something like: response = requests.post(f"{Config.base_url()}/create_user", headers=headers, json=user_body) So the question is whether or not it's worth it creating a new fixture for only one line ...


1

This is a common trap people fall into when writing behavior driven tests. You do not want to run entire scenarios as a prerequisite. Instead, you need to write one or more Given steps that simulate the things the other scenarios do. Without seeing an example of the login scenario, and one of the other scenarios requiring the user to log in I cannot give you ...


1

You've probably figured this out already, since you posted the question two months ago. But just in case, and for the benefit of anyone else who has the same question... PyTest's approach to supporting the parameterized test case design pattern is using what they call "fixtures". Fixtures are also used for the same purpose as TestNG's @Before* and @After* ...


Only top voted, non community-wiki answers of a minimum length are eligible