Skip to content

Commit 7aa75bf

Browse files
committed
Add lock mocks for tests
1 parent 72d5cb7 commit 7aa75bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kytos/lib/helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def get_interface_mock(name, port_number, switch, address="00:00:00:00:00:00"):
3333
interface.switch = switch
3434
interface.address = address
3535
interface.lldp = True
36+
interface.lock = MagicMock()
3637
return interface
3738

3839

@@ -53,6 +54,7 @@ def get_switch_mock(dpid, of_version=None):
5354
if of_version:
5455
switch.ofp_version = '0x0' + str(of_version)
5556
switch.connection = get_connection_mock(of_version, switch)
57+
switch.lock = MagicMock()
5658
return switch
5759

5860

0 commit comments

Comments
 (0)