@@ -884,7 +884,7 @@ def added_assign_setup(attachment=None):
884
884
def test_010_on_qdb_change_multiple_assignments_including_full (self ):
885
885
back , front = self .added_assign_setup ()
886
886
887
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
887
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
888
888
full_assig = DeviceAssignment (
889
889
VirtualDevice (exp_dev .port , exp_dev .device_id ),
890
890
mode = "auto-attach" ,
@@ -907,7 +907,7 @@ def test_010_on_qdb_change_multiple_assignments_including_full(self):
907
907
front .devices ["usb" ]._assigned .append (port_assign )
908
908
front .devices ["usb" ]._assigned .append (full_assig )
909
909
back .devices ["usb" ]._exposed .append (
910
- qubesusbproxy .core3ext .USBDevice (back , "1-1" )
910
+ qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
911
911
)
912
912
913
913
self .ext .attach_and_notify = Mock ()
@@ -922,7 +922,7 @@ def test_010_on_qdb_change_multiple_assignments_including_full(self):
922
922
def test_011_on_qdb_change_multiple_assignments_port_vs_dev (self ):
923
923
back , front = self .added_assign_setup ()
924
924
925
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
925
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
926
926
port_assign = DeviceAssignment (
927
927
VirtualDevice (exp_dev .port , "*" ),
928
928
mode = "auto-attach" ,
@@ -939,7 +939,7 @@ def test_011_on_qdb_change_multiple_assignments_port_vs_dev(self):
939
939
front .devices ["usb" ]._assigned .append (dev_assign )
940
940
front .devices ["usb" ]._assigned .append (port_assign )
941
941
back .devices ["usb" ]._exposed .append (
942
- qubesusbproxy .core3ext .USBDevice (back , "1-1" )
942
+ qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
943
943
)
944
944
945
945
self .ext .attach_and_notify = Mock ()
@@ -954,7 +954,7 @@ def test_011_on_qdb_change_multiple_assignments_port_vs_dev(self):
954
954
def test_012_on_qdb_change_multiple_assignments_dev (self ):
955
955
back , front = self .added_assign_setup ()
956
956
957
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
957
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
958
958
port_assign = DeviceAssignment (
959
959
VirtualDevice (Port (exp_dev .backend_domain , "1-2" , "usb" ), "*" ),
960
960
mode = "auto-attach" ,
@@ -971,10 +971,10 @@ def test_012_on_qdb_change_multiple_assignments_dev(self):
971
971
front .devices ["usb" ]._assigned .append (dev_assign )
972
972
front .devices ["usb" ]._assigned .append (port_assign )
973
973
back .devices ["usb" ]._exposed .append (
974
- qubesusbproxy .core3ext .USBDevice (back , "1-1" )
974
+ qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
975
975
)
976
976
back .devices ["usb" ]._exposed .append (
977
- qubesusbproxy .core3ext .USBDevice (back , "1-2" )
977
+ qubesusbproxy .core3ext .USBDevice (Port ( back , "1-2" , "usb" ) )
978
978
)
979
979
980
980
self .ext .attach_and_notify = Mock ()
@@ -989,7 +989,7 @@ def test_012_on_qdb_change_multiple_assignments_dev(self):
989
989
def test_013_on_qdb_change_two_fronts (self ):
990
990
back , front = self .added_assign_setup ()
991
991
992
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
992
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
993
993
assmnt = DeviceAssignment (exp_dev , mode = "auto-attach" )
994
994
995
995
front .devices ["usb" ]._assigned .append (assmnt )
@@ -1010,7 +1010,7 @@ def test_013_on_qdb_change_two_fronts(self):
1010
1010
def test_014_failed_confirmation (self , socket ):
1011
1011
back , front = self .added_assign_setup ()
1012
1012
1013
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1013
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1014
1014
assmnt = DeviceAssignment (exp_dev , mode = "auto-attach" )
1015
1015
1016
1016
front .devices ["usb" ]._assigned .append (assmnt )
@@ -1034,7 +1034,7 @@ def test_014_failed_confirmation(self, socket):
1034
1034
def test_015_successful_confirmation (self , socket ):
1035
1035
back , front = self .added_assign_setup ()
1036
1036
1037
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1037
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1038
1038
assmnt = DeviceAssignment (exp_dev , mode = "auto-attach" )
1039
1039
1040
1040
front .devices ["usb" ]._assigned .append (assmnt )
@@ -1055,7 +1055,7 @@ def test_015_successful_confirmation(self, socket):
1055
1055
def test_016_on_qdb_change_ask (self ):
1056
1056
back , front = self .added_assign_setup ()
1057
1057
1058
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1058
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1059
1059
assmnt = DeviceAssignment (exp_dev , mode = "ask-to-attach" )
1060
1060
1061
1061
front .devices ["usb" ]._assigned .append (assmnt )
@@ -1070,7 +1070,7 @@ def test_016_on_qdb_change_ask(self):
1070
1070
def test_020_on_startup_multiple_assignments_including_full (self ):
1071
1071
back , front = self .added_assign_setup ()
1072
1072
1073
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1073
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1074
1074
full_assig = DeviceAssignment (
1075
1075
VirtualDevice (exp_dev .port , exp_dev .device_id ),
1076
1076
mode = "auto-attach" ,
@@ -1093,7 +1093,7 @@ def test_020_on_startup_multiple_assignments_including_full(self):
1093
1093
front .devices ["usb" ]._assigned .append (port_assign )
1094
1094
front .devices ["usb" ]._assigned .append (full_assig )
1095
1095
back .devices ["usb" ]._exposed .append (
1096
- qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1096
+ qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1097
1097
)
1098
1098
1099
1099
self .ext .attach_and_notify = AsyncMock ()
@@ -1106,7 +1106,7 @@ def test_020_on_startup_multiple_assignments_including_full(self):
1106
1106
def test_021_on_startup_multiple_assignments_port_vs_dev (self ):
1107
1107
back , front = self .added_assign_setup ()
1108
1108
1109
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1109
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1110
1110
port_assign = DeviceAssignment (
1111
1111
VirtualDevice (exp_dev .port , "*" ),
1112
1112
mode = "auto-attach" ,
@@ -1123,7 +1123,7 @@ def test_021_on_startup_multiple_assignments_port_vs_dev(self):
1123
1123
front .devices ["usb" ]._assigned .append (dev_assign )
1124
1124
front .devices ["usb" ]._assigned .append (port_assign )
1125
1125
back .devices ["usb" ]._exposed .append (
1126
- qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1126
+ qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1127
1127
)
1128
1128
1129
1129
loop = asyncio .get_event_loop ()
@@ -1136,7 +1136,7 @@ def test_021_on_startup_multiple_assignments_port_vs_dev(self):
1136
1136
def test_022_on_startup_multiple_assignments_dev (self ):
1137
1137
back , front = self .added_assign_setup ()
1138
1138
1139
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1139
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1140
1140
port_assign = DeviceAssignment (
1141
1141
VirtualDevice (Port (exp_dev .backend_domain , "1-2" , "usb" ), "*" ),
1142
1142
mode = "auto-attach" ,
@@ -1153,10 +1153,10 @@ def test_022_on_startup_multiple_assignments_dev(self):
1153
1153
front .devices ["usb" ]._assigned .append (dev_assign )
1154
1154
front .devices ["usb" ]._assigned .append (port_assign )
1155
1155
back .devices ["usb" ]._exposed .append (
1156
- qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1156
+ qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1157
1157
)
1158
1158
back .devices ["usb" ]._exposed .append (
1159
- qubesusbproxy .core3ext .USBDevice (back , "1-2" )
1159
+ qubesusbproxy .core3ext .USBDevice (Port ( back , "1-2" , "usb" ) )
1160
1160
)
1161
1161
1162
1162
self .ext .attach_and_notify = AsyncMock ()
@@ -1169,7 +1169,7 @@ def test_022_on_startup_multiple_assignments_dev(self):
1169
1169
def test_023_on_startup_already_attached (self ):
1170
1170
back , front = self .added_assign_setup (attachment = "sys-usb" )
1171
1171
1172
- exp_dev = qubesusbproxy .core3ext .USBDevice (back , "1-1" )
1172
+ exp_dev = qubesusbproxy .core3ext .USBDevice (Port ( back , "1-1" , "usb" ) )
1173
1173
assmnt = DeviceAssignment (
1174
1174
VirtualDevice (exp_dev .port , exp_dev .device_id ), mode = "auto-attach"
1175
1175
)
0 commit comments