|
@ -6,17 +6,18 @@ from .settings import SAPL_APPS |
|
|
|
|
|
|
|
|
pytestmark = pytest.mark.django_db |
|
|
pytestmark = pytest.mark.django_db |
|
|
|
|
|
|
|
|
for model in apps.get_models(): |
|
|
def test_charfiled_textfield(): |
|
|
fields = model._meta.local_fields |
|
|
for model in apps.get_models(): |
|
|
for field in fields: |
|
|
fields = model._meta.local_fields |
|
|
if (type(field).__name__ == 'CharField' or |
|
|
for field in fields: |
|
|
type(field).__name__ == 'TextField'): |
|
|
if (type(field).__name__ == 'CharField' or |
|
|
msg = 'Model = %s || Field = %s - %s - %s' % ( |
|
|
type(field).__name__ == 'TextField'): |
|
|
model.__name__, |
|
|
msg = 'Model = %s || Field = %s - %s - %s' % ( |
|
|
field.attname, |
|
|
model.__name__, |
|
|
type(field).__name__, |
|
|
field.attname, |
|
|
field.null) |
|
|
type(field).__name__, |
|
|
raise AssertionError(msg) |
|
|
field.null) |
|
|
|
|
|
raise AssertionError(msg) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_str_sanity(): |
|
|
def test_str_sanity(): |
|
|