コード例 #1
0
ファイル: conf.py プロジェクト: COLABORATI/django-guardian
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
ファイル: conf.py プロジェクト: zauddelig/django-guardian
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)