def test_select_classes_when_no_complex_class_available(self): classes = [ ClassFactory.enumeration(2), ClassFactory.create(type=SimpleType) ] container = ClassContainer.from_list(classes) self.assertEqual(classes, ClassAnalyzer.select_classes(container))
def test_select_classes(self, mock_validate_references): classes = [ ClassFactory.create(strict_type=True, type=ComplexType), ClassFactory.create(type=Element), ClassFactory.create(type=ComplexType), ClassFactory.create(type=SimpleType), ClassFactory.enumeration(2), ] container = ClassContainer.from_list(classes) expected = [ classes[1], classes[2], classes[4], ] self.assertEqual(expected, ClassAnalyzer.select_classes(container)) mock_validate_references.assert_called_once_with(expected)