コード例 #1
0
    def test_no_match(self, _, __, ___, ____):
        """Test when no information could be retrieved"""
        model = Model()

        output_mock = MagicMock()
        model.output(output_mock)

        self.assertIsNone(model.value)
        self.assertEqual(output_mock.append.call_args[0][1],
                         DEFAULT_CONFIG['default_strings']['not_detected'])
コード例 #2
0
    def test_no_match(self):
        """Test when no information could be retrieved"""
        model_instance_mock = HelperMethods.entry_mock(Model)

        output_mock = MagicMock()
        Model.output(model_instance_mock, output_mock)

        self.assertIsNone(model_instance_mock.value)
        self.assertEqual(output_mock.append.call_args[0][1],
                         DEFAULT_CONFIG['default_strings']['not_detected'])