21 lines
444 B
Python
21 lines
444 B
Python
|
import pytest
|
||
|
|
||
|
|
||
|
@pytest.fixture()
|
||
|
def login(request):
|
||
|
username, pwd = request.param
|
||
|
if username == "ok" and pwd == "123456":
|
||
|
return "ok"
|
||
|
else:
|
||
|
return "notok"
|
||
|
|
||
|
|
||
|
class TestDemo:
|
||
|
pytestmark = pytest.mark.parametrize("login", [("ok", "123456"), ("ok1", "123456"), ("ok", "1234562")],
|
||
|
indirect=True)
|
||
|
|
||
|
def test_demo(self, login):
|
||
|
print(login)
|
||
|
|
||
|
|