Fix bug where psets were unable to be applied for specific predefined types

This commit is contained in:
Dion Moult
2022-02-18 17:10:38 +11:00
parent 4d6eba0a06
commit ddaed9e93d
2 changed files with 20 additions and 5 deletions
+10 -2
View File
@@ -28,8 +28,16 @@ class TestPsetQto:
def test_get_applicables(self):
for i in range(1000):
assert len(self.pset_qto.get_applicable("IfcMaterial")) == 14
assert len(self.pset_qto.get_applicable("IfcMaterial")) == 9
def test_get_applicables_names(self):
for i in range(1000):
assert len(self.pset_qto.get_applicable_names("IfcMaterial")) == 14
assert len(self.pset_qto.get_applicable_names("IfcMaterial")) == 9
def test_getting_applicables_for_a_specific_predefined_type(self):
names = self.pset_qto.get_applicable_names("IfcAudioVisualAppliance")
assert len(names) == 17
assert "Pset_AudioVisualApplianceTypeAmplifier" not in names
names = self.pset_qto.get_applicable_names("IfcAudioVisualAppliance", predefined_type="AMPLIFIER")
assert "Pset_AudioVisualApplianceTypeAmplifier" in names
assert len(names) == 18