def test_object_compare__with_description(self): object1 = ObjectDto(Object()) object2 = ObjectDto(Object()) object1.name = "a" object1.description = "a" object2.name = "a" object2.description = "b" self.assertEqual(object1, sorted([object2, object1])[0])
def test_object_compare__with_description(self): object1 = ObjectDto(Object()) object2 = ObjectDto(Object()) object1.name = "a" object1.description = "a" object2.name = "a" object2.description = "b" self.assertEqual(object1, sorted([object2, object1])[0])
def test_object_compare__with_type(self): object1 = ObjectDto(Object()) object2 = ObjectDto(Object()) object1.name = "a" object1.description = "a" object1.type = Object.Types.bool object2.name = "a" object2.description = "a" object2.type = Object.Types.string self.assertEqual(object1, sorted([object2, object1])[0])
def test_object_compare__with_type(self): object1 = ObjectDto(Object()) object2 = ObjectDto(Object()) object1.name = "a" object1.description = "a" object1.type = Object.Types.bool object2.name = "a" object2.description = "a" object2.type = Object.Types.string self.assertEqual(object1, sorted([object2, object1])[0])
def test_object_compare__with_optional(self): object1 = ObjectDto(Object()) object2 = ObjectDto(Object()) object1.name = "a" object1.description = "a" object1.type = Object.Types.bool object1.optional = False object2.name = "a" object2.description = "a" object2.type = Object.Types.bool object2.optional = True self.assertEqual(object1, sorted([object2, object1])[0])
def test_object_compare__with_optional(self): object1 = ObjectDto(Object()) object2 = ObjectDto(Object()) object1.name = "a" object1.description = "a" object1.type = Object.Types.bool object1.optional = False object2.name = "a" object2.description = "a" object2.type = Object.Types.bool object2.optional = True self.assertEqual(object1, sorted([object2, object1])[0])