def test_should_raise_missing_resource_when_resource_not_found(self):
        # Given
        resources = dict()

        # When
        with self.assertRaises(MissingResource):
            _get_resource(resources, "foobar")
Exemplo n.º 2
0
    def test_should_raise_missing_resource_when_resource_not_found(self):
        # Given
        mocked_value = {"en": dict()}

        # When
        with patch("snips_nlu.resources._RESOURCES", mocked_value):
            with self.assertRaises(MissingResource):
                _get_resource("en", "foobar")