Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/d/j/django-fixtureless-HEAD/fixtureless/generator.py   django-fixtureless(Download)
    def _get_integer_limits(self, field, connection_obj=connection):
        conn_type = field.db_type(connection_obj)
        if conn_type.startswith('integer') or conn_type.startswith('serial'):
            limits = (constants.POSTGRES_INT_MIN, constants.POSTGRES_INT_MAX)
        elif conn_type.startswith('bigint'):

src/d/j/django-fixtureless-1.2.0/fixtureless/generator.py   django-fixtureless(Download)
    def _get_integer_limits(self, field, connection_obj=connection):
        conn_type = field.db_type(connection_obj)
        if conn_type.startswith('integer') or conn_type.startswith('serial'):
            limits = (constants.POSTGRES_INT_MIN, constants.POSTGRES_INT_MAX)
        elif conn_type.startswith('bigint'):

src/d/j/django-fixtureless-HEAD/fixtureless/tests/test_django_project/test_django_project/test_app/tests/generator.py   django-fixtureless(Download)
from test_app.models import ModelOne, ModelTwo
from fixtureless.generator import create_instance
from fixtureless.constants import POSTGRES_SMALLINT_MAX, POSTGRES_INT_MAX, PY3
 
 
    def test_positive_integer_field(self):
        self.assertIsInstance(self.model_one.positive_integer_field, int)
        exp = 0 <= self.model_one.positive_integer_field <= \
            POSTGRES_INT_MAX
        self.assertTrue(exp)
    def test_auto_field(self):
        self.assertIsInstance(self.model_one.auto_field, int)
        exp = 0 <= self.model_one.auto_field <= POSTGRES_INT_MAX
        self.assertTrue(exp)
 
    def test_email_field(self):
        self.assertIsInstance(self.model_one.email_field, self.basestring)
        exp = 0 < len(self.model_one.email_field) <= POSTGRES_INT_MAX
        self.assertTrue(exp)
 
        local, domain = self.model_one.email_field.split('@')
        exp = 0 < len(local) <= int(POSTGRES_INT_MAX/2 - 5)