def to_database(self, value): value = super(Integer, self).to_database(value) if value is not None: return long_(value)
def to_python(self, value): if value is not None: return long_(value)
def to_python(self, value): if value is not None: try: return int(value) except: return long_(value)
class LongPropertyTestCase(GraphPropertyBaseClassTestCase): klass = Long good_cases = (long_(1), long_(0), None) bad_cases = ('', 'a', 1.1, [], [1], {}, {'a': 1})