def test_interface_property_detector_is_not_wireless(self, pyric): """ Test interface_property_detector function when the interface is not wireless """ pyric.iswireless.return_value = False interfaces.interface_property_detector(self.adapter) message = "Shows interfaces is wireless when it is not" self.assertFalse(self.adapter.is_wireless, message)
def test_interface_property_detector_is_wireless(self, pyric): """ Test interface_property_detector function when the interface is wireless """ pyric.iswireless.return_value = True interfaces.interface_property_detector(self.adapter) message = "Failed to show interface as wireless when it is" self.assertTrue(self.adapter.is_wireless, message)
def test_interface_property_detector_no_ap_mode(self, pyric): """ Test interface_property_detector function when the interface doesn't have AP mode support """ pyric.devmodes.return_value = [] interfaces.interface_property_detector(self.adapter) message = "Shows interface has AP mode when it does not" self.assertFalse(self.adapter.has_ap_mode, message)
def test_interface_property_detector_has_ap_mode(self, pyric): """ Test interface_property_detector function when the interface has AP mode support """ pyric.devmodes.return_value = ["AP"] interfaces.interface_property_detector(self.adapter) message = "Failed to get AP mode support when interface has support" self.assertTrue(self.adapter.has_ap_mode, message)
def test_interface_property_detector_no_ap_mode(self, pyric): """ Test interface_property_detector function when the interface doesn't have AP mode support """ pyric.devmodes.return_value = [] interfaces.interface_property_detector(self.adapter) message = "Shows interface has AP mode when it does not" self.assertFalse(self.adapter.has_ap_mode, message)
def test_interface_property_detector_has_ap_mode(self, pyric): """ Test interface_property_detector function when the interface has AP mode support """ pyric.devmodes.return_value = ["AP"] interfaces.interface_property_detector(self.adapter) message = "Failed to get AP mode support when interface has support" self.assertTrue(self.adapter.has_ap_mode, message)