'Test item value model'

def test_model_item_value(self):

    status = ItemStatus(name='test')
    status.save()
    type = ItemType(name='test')
    type.save()
    item = Item(name='test', item_type=type, status=status)
    item.save()
    field = ItemField(name='test', label='test', field_type='text')
    field.save()
    obj = ItemValue(value='test', field=field, item=item)
    obj.save()
    self.assertEquals('test', obj.value)
    self.assertNotEquals(obj.id, None)
    obj.delete()
