def setUp(self): self.user = UserFactory() self.auth = AuthFactory(user=self.user) username = self.user.username password = "******" self.token_credentials = token_auth_header(self.auth.token) self.basic_credentials = basic_auth_header(username, password)
def setUpTestData(cls): """Set up the test data within the test db.""" cls.user = UserFactory() cls.auth = AuthFactory() cls.device = TOTPDevice.objects.create(user=cls.user) cls.relate = TOTPDevice.challenge.objects.create(device=cls.device, token=cls.auth) cls.algorithm = TOTPAlgorithm()
def setUp(self): self.user = UserFactory() self.auth = AuthFactory(user=self.user)
def setUpTestData(cls): """Set up the test data.""" cls.user = UserFactory() cls.auth = AuthFactory(user=cls.user)