0

My test case looks like this. Following is the code:

@patch('something.mysqlclient')
@patch('something.esclient')
def testcase1(mysql,esclient):
    esclient.return_value = 1
    mysql.return_value = 3
    assert something.modeul1.esclient == 1
    assert something.modeul1.mysql == 3
Ankita
  • 11
  • 2

1 Answers1

0

Decorator works from bottom to top.

@patch('something.mysqlclient')
@patch('something.esclient')
def testcase1(esclient, mysql):
    pass
Ashutosh gupta
  • 447
  • 4
  • 16