def testThatListElementIsReturnedForListAttributes(self):
     attribute = self.createAttribute(list=True)
     attr1 = self.createAttributeValueForCharacter(attribute, initialValue=self.uniqStr())
     attr2 = self.createAttributeValueForCharacter(attribute, initialValue=self.uniqStr())
     actual = createAttributeElement(self.context, attribute)
     self.assertElementForListAttribute(actual, [attr1.value, attr2.value], attribute=attribute)
 def testThatDataInputAttributeIsSelectForConceptAttributes(self):
     attribute = self.addAttributeToCharacter(type="concept")
     actual = createAttributeElement(self.context, attribute.name)
     self.assertElementForSimpleAttribute(actual, expectedAttributes={"data-editor": "select"}, attribute=attribute)
 def testThatAttributeElementIsReturnedUsingAttributeNameAsUnicode(self):
     actual = createAttributeElement(self.context, unicode(self.charAttr.name))
     self.assertElementForSimpleAttribute(actual)
    def testThatAttributeElementIsReturnedUsingAttributeNameWhenManyGameSystemsHaveSameAttributeName(self):
        gameSystem = GameSystem.objects.create(name="something else")
        CharacterAttribute.objects.create(gameSystem=gameSystem, name=self.charAttr.name)

        actual = createAttributeElement(self.context, self.charAttr.name)
        self.assertElementForSimpleAttribute(actual)
 def testThatAttributeElementIsReturnedUsingAttributeReference(self):
     actual = createAttributeElement(self.context, self.charAttr)
     self.assertElementForSimpleAttribute(actual)