def test_complex9(self): self.entity.value = ComplexValue('Foo') self.assertEqual(self.entity.value, 'Foo') self.entity.value = ComplexValue(['Foo3','Foo4']) self.assertEqual(self.entity.value, 'Foo3') self.entity.value = ComplexValue(OrderedDict((('one','Foo5'),('few','Foo6'),('many','Foo7')))) self.assertEqual(self.entity.value, 'Foo5')
def test_complex8(self): self.entity.value = ComplexValue('Foo') self.assertRaises(TypeError, self.entity.__getitem__, 0) self.entity.value = ComplexValue(['Foo3','Foo4']) self.assertEqual(self.entity[1], 'Foo4') self.entity.value = ComplexValue({'one':'Foo5','few':'Foo6','many':'Foo7'}) self.assertEqual(self.entity['few'], 'Foo6')
def test_complex9(self): self.entity.value = ComplexValue("Foo") self.assertEqual(self.entity.value, "Foo") self.entity.value = ComplexValue(["Foo3", "Foo4"]) self.assertEqual(self.entity.value, "Foo3") self.entity.value = ComplexValue( OrderedDict((("one", "Foo5"), ("few", "Foo6"), ("many", "Foo7")))) self.assertEqual(self.entity.value, "Foo5")
def test_complex8(self): self.entity.value = ComplexValue("Foo") self.assertRaises(TypeError, self.entity.__getitem__, 0) self.entity.value = ComplexValue(["Foo3", "Foo4"]) self.assertEqual(self.entity[1], "Foo4") self.entity.value = ComplexValue({ "one": "Foo5", "few": "Foo6", "many": "Foo7" }) self.assertEqual(self.entity["few"], "Foo6")
def test_complex7(self): self.entity.value = ComplexValue("Foo") self.assertRaises(TypeError, self.entity.__getitem__, 0)
def test_complex6(self): self.entity.value = ComplexValue(["foo", "foo4"]) self.assertEqual(self.entity[1], "foo4")
def test_complex5(self): self.entity.value = ComplexValue({"male": "Foo2", "female": "Foo3"}) self.assertEqual(self.entity["male"], "Foo2")
def test_complex6(self): self.entity.value = ComplexValue(['foo','foo4']) self.assertEqual(self.entity[1], 'foo4')
def test_complex5(self): self.entity.value = ComplexValue({'male':'Foo2','female':'Foo3'}) self.assertEqual(self.entity['male'], 'Foo2')