Exemple #1
0
    def test_get_fields(self):
        """Test the get_fields method.

        Test whether a RuntimeError is raised.

        """
        fs = GrondwaterFilterSearch(objecttype=MyWrongGrondwaterFilter)

        with pytest.raises(RuntimeError):
            fs.get_fields()
Exemple #2
0
    def test_get_fields(self):
        """Test the get_fields method.

        Test whether the extra field is available in the output of the
        get_fields metadata.

        """
        fs = GrondwaterFilterSearch(objecttype=MyGrondwaterFilter)
        fields = fs.get_fields()

        assert 'grondwatersysteem' in fields
Exemple #3
0
    def test_get_fields(self):
        """Test the get_fields method.

        Test whether the extra field is available in the output of the
        get_fields metadata.

        """
        fs = GrondwaterFilterSearch(objecttype=MyGrondwaterFilterOpbouw)
        fields = fs.get_fields()

        assert 'datum' not in fields
        assert 'peil_mtaw' not in fields

        assert 'opbouw_van' in fields
        assert 'opbouw_tot' in fields
        assert 'opbouw_element' in fields