예제 #1
0
def skipUnlessSupportsCustomUser(obj):
    # XXX: Following fixes problem with Python 2.6 and Django 1.2
    gte15 = django.VERSION >= (1, 5)
    if not gte15:
        return lambda *args, **kwargs: None
    # XXX: End of the workaround
    return unittest.skipUnless(django.VERSION >= (1, 5), 'Must have Django 1.5 or greater')(obj)
예제 #2
0
def skipUnlessSupportsCustomUser(obj):
    # XXX: Following fixes problem with Python 2.6 and Django 1.2
    gte15 = django.VERSION >= (1, 5)
    if not gte15:
        return lambda *args, **kwargs: None
    # XXX: End of the workaround
    return unittest.skipUnless(django.VERSION >= (1, 5),
                               'Must have Django 1.5 or greater')(obj)
예제 #3
0
def skipUnlessTestApp(obj):
    app = 'guardian.testapp'
    return unittest.skipUnless(
        app in settings.INSTALLED_APPS,
        'app %r must be installed to run this test' % app)(obj)
예제 #4
0
def skipUnlessSupportsCustomUser(obj):
    return unittest.skipUnless(django.VERSION >= (1, 5),
                               'Must have Django 1.5 or greater')(obj)
예제 #5
0
파일: conf.py 프로젝트: sazhyk/defarena
def skipUnlessTestApp(obj):
    app = 'guardian.testapp'
    return unittest.skipUnless(app in settings.INSTALLED_APPS,
                      'app %r must be installed to run this test' % app)(obj)
예제 #6
0
파일: conf.py 프로젝트: Alan502/MacWorld
def skipUnlessSupportsCustomUser(obj):
    return unittest.skipUnless(django.VERSION >= (1, 5), 'Must have Django 1.5 or greater')(obj)