SG-34359 Add field type entity_type to mockgun as simple str#319
SG-34359 Add field type entity_type to mockgun as simple str#319slingshotsys wants to merge 1 commit intoshotgunsoftware:masterfrom
entity_type to mockgun as simple str#319Conversation
|
Hello, thank you for the contribution. Can you provide a use case when this is helpful? Cheers |
|
Hey Carlos, I was adding tests for code that creates ActionMenuItems on a site through the Python API. So I wanted to assert they were created in Mockgun. The following code: sg_amis = mockgun.find(
"ActionMenuItem",
filters=[],
fields=[
"title",
"entity_type",
],
)results in As far as I can tell, entity_type fields in Shotgrid are just text fields, maybe limited to a specific set of values matching the entities available in the Shotgrid site. I suppose in Mockgun you could add some validation to verify that the value of entity_type fields exists as an entity name in the Schema, but for my purposes just setting it to a string worked great. Thanks! |
|
I think it's a good idea to add |
entity_type to mockgun as simple strentity_type to mockgun as simple str
For testing purposes, it can be helpful to support
entity_typefield types, even if there's no validation that it's an existing Entity from the schema.