示例#1
0
    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)
示例#2
0
    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)
示例#3
0
    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)
示例#4
0
    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)
示例#5
0
    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)
示例#6
0
    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)