/usr/lib/python2.7/dist-packages/formalchemy/tests/test_column.py is in python-formalchemy 1.4.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # -*- coding: utf-8 -*-
from formalchemy.tests import *
class Label(Base):
__tablename__ = 'label'
id = Column(Integer, primary_key=True)
label = Column(String, label='My label')
def test_label():
"""
>>> Label.__table__.c.label.info
{'label': 'My label'}
>>> fs = FieldSet(Label)
>>> print fs.label.label_text
My label
>>> print fs.label.label()
My label
"""
def test_fk_label(self):
"""
>>> fs = FieldSet(Order)
>>> print fs.user.label_text
User
>>> print fs.user.label()
User
"""
|