예제 #1
0
    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)
예제 #2
0
    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()
예제 #3
0
 def setUp(self):
     self.user = UserFactory()
     self.auth = AuthFactory(user=self.user)
예제 #4
0
 def setUpTestData(cls):
     """Set up the test data."""
     cls.user = UserFactory()
     cls.auth = AuthFactory(user=cls.user)