'Testing the django.test.skipUnlessDBFeature decorator.'

def test_skip_unless_db_feature(self):

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