Skip to content

Commit

Permalink
Filter test_rule_inlinefieldlist "Fields missing from ruleset" warning
Browse files Browse the repository at this point in the history
flask_admin/tests/sqla/test_form_rules.py:135: in test_rule_inlinefieldlist
    view = CustomModelView(Model1, db.session,
flask_admin/tests/sqla/test_basic.py:33: in __init__
    super(CustomModelView, self).__init__(model, session, name, category,
flask_admin/contrib/sqla/view.py:346: in __init__
    super(ModelView, self).__init__(model, name, category, endpoint, url, static_folder,
flask_admin/model/base.py:834: in __init__
    self._refresh_cache()
flask_admin/model/base.py:968: in _refresh_cache
    self._validate_form_class(self._form_create_rules, self._create_form_class)
flask_admin/model/base.py:1447: in _validate_form_class
    self._show_missing_fields_warning('Fields missing from ruleset: %s' % (','.join(missing_fields)))
flask_admin/model/base.py:1431: in _show_missing_fields_warning
    warnings.warn(text)
E   UserWarning: Fields missing from ruleset: test2,test3,test4,bool_field,date_field,time_field,datetime_field,email_field,enum_field,choice_field,sqla_utils_choice,sqla_utils_enum,sqla_utils_arrow,sqla_utils_uuid,sqla_utils_url,sqla_utils_ip_address,sqla_utils_currency,sqla_utils_color
  • Loading branch information
cjmayo committed Jul 21, 2024
1 parent 20e6563 commit 2d1edae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flask_admin/tests/sqla/test_form_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def test_rule_field_set(app, db, admin):

@pytest.mark.filterwarnings(
"ignore:'iter_groups' is expected to return 4 items tuple since wtforms 3.1, this will be mandatory in wtforms 3.2:DeprecationWarning",
"ignore:Fields missing from ruleset.*:UserWarning",
"ignore:Please update your type formatter:UserWarning",
)
def test_rule_inlinefieldlist(app, db, admin):
Expand Down

0 comments on commit 2d1edae

Please sign in to comment.