From fffa5f137ad569a648490c4f7a8cb5ed3a6868df Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Sun, 10 Jul 2016 15:45:01 -0300 Subject: [PATCH] Ajusta teste --- sapl/test_general.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/sapl/test_general.py b/sapl/test_general.py index 53465b193..da2e17ae6 100644 --- a/sapl/test_general.py +++ b/sapl/test_general.py @@ -7,21 +7,19 @@ from .settings import SAPL_APPS pytestmark = pytest.mark.django_db -sapl_appconfs = [apps.get_app_config(n) for n in SAPL_APPS] +sapl_appconfs = [apps.get_app_config(n[5:]) for n in SAPL_APPS] -def test_charfiled_textfield(): +def test_charfield_textfield(): for app in sapl_appconfs: for model in app.get_models(): fields = model._meta.local_fields for field in fields: if isinstance(field, (CharField, TextField)): - msg = 'Model = %s || Field = %s - %s - %s' % ( - model.__name__, - field.attname, - type(field).__name__, - field.null) - assert not field.null, msg + assert not field.null, 'This %s is null: %s.%s' % ( + type(field).__name__, + model.__name__, + field.attname) def test_str_sanity():