Skip to content

Commit ec2a2bc

Browse files
committed
Fixed spy and stub test problems
1 parent d0199bd commit ec2a2bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test_pytest_mock.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,17 @@ def bar(self, arg):
145145
return arg * 2
146146

147147
foo = Foo()
148-
spy = mocker.spy(foo, 'Bar')
148+
spy = mocker.spy(foo, 'bar')
149149

150-
assert foo.Bar(arg=10) == 20
150+
assert foo.bar(arg=10) == 20
151151
spy.assert_called_once_with(arg=10)
152152

153153

154154
def test_mocker_stub(mocker):
155-
def Foo(on_something):
155+
def foo(on_something):
156156
on_something('foo', 'bar')
157157

158158
stub = mocker.stub()
159159

160-
Foo(stub)
160+
foo(stub)
161161
stub.assert_called_once_with('foo', 'bar')

0 commit comments

Comments
 (0)