Skip to content

test_sg_base

Base class to test Shotgrid implementation via Mockgun.

test_hub_initialization(hub_and_project)

Example test to validate the hub object was created correctly.

Source code in services/tests/test_sg_base.py
6
7
8
9
def test_hub_initialization(hub_and_project):
    """ Example test to validate the hub object was created correctly. """
    hub = hub_and_project["hub"]
    assert hub.sg_enabled_entities == ("Episode", "Sequence", "Shot", "Asset")

test_project_entity_attributes(hub_and_project)

Validate attributes of the mocked FolderEntity.

Source code in services/tests/test_sg_base.py
12
13
14
15
def test_project_entity_attributes(hub_and_project):
    """ Validate attributes of the mocked FolderEntity. """
    entity = hub_and_project["project_entity"]
    assert entity.attribs[constants.SHOTGRID_TYPE_ATTRIB] == "Project"