def setup_class(cls):
        user_controller = UserController()
        user_controller.delete_every_user()

        test_user_dict = {
            "username": "******",
            "password": "******",
            "reCaptchaResponse": "asd"
        }

        requests.post('http://127.0.0.1:{}/register'.format(cls.PORT),
                      json=test_user_dict)

        login_response = requests.post('http://127.0.0.1:{}/login'.format(
            cls.PORT),
                                       json=test_user_dict)

        jwt = login_response.json()['accessToken']

        refresh_jwt = login_response.json()['refreshToken']

        cls.headers = {"Authorization": "Bearer {}".format(jwt)}

        cls.refresh_headers = {
            "Authorization": "Bearer {}".format(refresh_jwt)
        }
 def teardown_class(cls):
     user_controller = UserController()
     user_controller.delete_every_user()
     video_controller = VideoController()
     video_controller.delete_videos()
Exemplo n.º 3
0
 def teardown_class(cls):
     user_controller = UserController()
     user_controller.delete_every_user()