I'm trying to tun the parameterized_class as in the documentation, but according to the code, its necessary to remove all test_ methods, leaving me with a class with 0 tests
I have the following;
from rest_framework.test import APITestCase
@parameterized_class("auth", ["token", "api_key"])
class TestFoo(APITestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
def setUp(self):
super().setUp()
def test_foo_one(self):
self.assertEqual(...)
def test_foo_two(self):
self.assertEqual(...)
If I try to run a test individualy, I get AttributeError: type object 'TestFoo' has no attribute 'test_foo_one'
If I run the class, no tests are found.
I could use the @parameterized.expand in each test, but I didn't want to duplicate the same line everytime.
What am I missing?
Thanks 👍
I'm trying to tun the
parameterized_classas in the documentation, but according to the code, its necessary to remove alltest_methods, leaving me with a class with 0 testsI have the following;
If I try to run a test individualy, I get
AttributeError: type object 'TestFoo' has no attribute 'test_foo_one'If I run the class, no tests are found.
I could use the
@parameterized.expandin each test, but I didn't want to duplicate the same line everytime.What am I missing?
Thanks 👍