Skip to content

test_concepts#

concepts#

Source code in tests/unit/apps/core/models/test_concepts.py
@pytest.fixture
def concepts():
    return [
        factories.AccessTypeFactory,
        factories.DatasetLicenseFactory,
        factories.EventOutcomeFactory,
        factories.FieldOfScienceFactory,
        factories.FileTypeFactory,
        factories.IdentifierTypeFactory,
        factories.LanguageFactory,
        factories.LifecycleEventFactory,
        factories.SpatialFactory,
        factories.ThemeFactory,
        factories.UseCategoryFactory,
    ]

test_concept_creation_and_to_string#

Source code in tests/unit/apps/core/models/test_concepts.py
def test_concept_creation_and_to_string(concepts):
    for concept in concepts:
        saved_concept = concept.create()
        assert saved_concept.id is not None
        assert str(saved_concept) is not None