Skip to content

Commit

Permalink
Update test_aec_data_model.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Sep 4, 2024
1 parent e81e88c commit 9b0e2a7
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions APSToolkitPython/src/test/test_aec_data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,38 @@ def test_get_elements_from_type(self):
"propertyFilter": "'property.name.category'=contains=Walls and 'property.name.Element Context'==Type'"
}
result = self.aec_data_model.execute_query_variables(query, variables)
self.assertIsNotNone(result)

def test_get_data_instance_type_category(self):
query = """
query GetElementsFromCategory($elementGroupId: ID!, $propertyFilter: String!) {
elementsByElementGroup(elementGroupId: $elementGroupId, filter: {query:$propertyFilter}) {
pagination {
cursor
}
results {
id
name
properties(includeReferencesProperties: "Type") {
results {
name
value
definition {
units{
name
}
}
}
}
}
}
}
"""

# Set the variables (replace with your actual values)
variables = {
"elementGroupId": "YWVjZH45enZvNHRHazl1RTI4VVc0NUsySkgzX0wyQ35yTHd5MTNSSlFhMml5cmlCZ1NMd3ZB",
"propertyFilter": "'property.name.category'==Walls and 'property.name.Element Context'==Instance"
}
result = self.aec_data_model.execute_query_variables(query, variables)
self.assertIsNotNone(result)

0 comments on commit 9b0e2a7

Please sign in to comment.