Example #1
0
    def test_gets_environment_and_calls_ios_platform_specific_method(
            self, mock_device_state, mock_ios_environment):
        type(mock_device_state).platform = mock.PropertyMock(return_value=Ios)

        get_environment()

        self.assertTrue(mock_ios_environment.called)
Example #2
0
    def test_gets_environment_and_calls_android_platform_specific_method(self, mock_device_state,
                                                                         mock_android_environment):
        type(mock_device_state).device_type = mock.PropertyMock(return_value='android')

        get_environment()

        self.assertTrue(mock_android_environment.called)