Did I find the right examples for you? yes no

All Samples(169)  |  Call(158)  |  Derive(0)  |  Import(11)

src/a/p/appscale-HEAD/AppServer/lib/django-1.4/tests/modeltests/validation/tests.py   appscale(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertEqual(None, giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertEqual(None, giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/a/p/appscale-HEAD/AppServer/lib/django-1.5/tests/modeltests/validation/tests.py   appscale(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertEqual(None, giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertEqual(None, giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/g/o/google-app-engine-HEAD/lib/django-1.4/tests/modeltests/validation/tests.py   google-app-engine(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertEqual(None, giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertEqual(None, giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/g/o/google-app-engine-HEAD/lib/django-1.5/tests/modeltests/validation/tests.py   google-app-engine(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertEqual(None, giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertEqual(None, giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/h/u/hue-HEAD/desktop/core/ext-py/Django-1.4.5/tests/modeltests/validation/tests.py   hue(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertEqual(None, giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertEqual(None, giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/g/o/googleappengine-python-HEAD/lib/django-1.4/tests/modeltests/validation/tests.py   googleappengine-python(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertEqual(None, giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertEqual(None, giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/d/j/Django-1.6.4/tests/validation/tests.py   Django(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertIsNone(giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertIsNone(giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/u/p/UP-Manager-0.0.0/tests/validation/tests.py   UP-Manager(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertIsNone(giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertIsNone(giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/d/e/Decode-Django-HEAD/Django-1.5.1/tests/modeltests/validation/tests.py   Decode-Django(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertEqual(None, giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertEqual(None, giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

src/c/l/CleanAdminDjango-1.5.3.1/tests/modeltests/validation/tests.py   CleanAdminDjango(Download)
 
from . import ValidationTestCase
from .models import (Author, Article, ModelToValidate,
    GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest)
 
    def test_correct_generic_ip_passes(self):
        giptm = GenericIPAddressTestModel(generic_ip="1.2.3.4")
        self.assertEqual(None, giptm.full_clean())
        giptm = GenericIPAddressTestModel(generic_ip="2001::2")
        self.assertEqual(None, giptm.full_clean())
 
    def test_invalid_generic_ip_raises_error(self):
        giptm = GenericIPAddressTestModel(generic_ip="294.4.2.1")
        self.assertFailsValidation(giptm.full_clean, ['generic_ip',])
        giptm = GenericIPAddressTestModel(generic_ip="1:2")

  1 | 2  Next