'Testing the django.test.skipIfDBFeature decorator.'

def test_skip_if_db_feature(self):

    @skipIfDBFeature('__class__')
    def test_func():
        raise ValueError
    @skipIfDBFeature('notprovided')
    def test_func2():
        raise ValueError
    @skipIfDBFeature('__class__', '__class__')
    def test_func3():
        raise ValueError
    @skipIfDBFeature('__class__', 'notprovided')
    def test_func4():
        raise ValueError
    @skipIfDBFeature('notprovided', 'notprovided')
    def test_func5():
        raise ValueError
    self._assert_skipping(test_func, unittest.SkipTest)
    self._assert_skipping(test_func2, ValueError)
    self._assert_skipping(test_func3, unittest.SkipTest)
    self._assert_skipping(test_func4, unittest.SkipTest)
    self._assert_skipping(test_func5, ValueError)
