Пример #1
0
    def setUp(self):
        EndpointShared.setUp(self)
        self.login = oeci_login.Crawler.login
        with self.app.app_context():

            self.cipher = DataCipher(
                key=current_app.config.get("JWT_SECRET_KEY"))
Пример #2
0
    def setUp(self):
        EndpointShared.setUp(self)
        """ Save these actual function refs to reinstate after we're done mocking them."""
        self.crawler_login = search.Crawler.login
        self.search = search.Crawler.search

        self.crawler = CrawlerFactory.setup()
        self.crawler.logged_in = True
        self.mock_record = {"john_doe": CrawlerFactory.create(self.crawler)}
Пример #3
0
    def setUp(self):
        EndpointShared.setUp(self)

        self.user_data["new_user"] = {
            "email": "pytest_create_user@endpoint_test.com",
            "password": "******",
            "hashed_password": generate_password_hash("new_password"),
            "name": "new name",
            "group_name": "new group name",
            "admin": False
        }
Пример #4
0
    def setUp(self):
        EndpointShared.setUp(self)
        """ Save these actual function refs to reinstate after we're done mocking them."""
        self.crawler_login = search.Crawler.login
        self.search = search.Crawler.search
        self.save_result = search.save_result

        self.crawler = CrawlerFactory.setup()
        self.crawler.logged_in = True
        self.mock_record = {"john_doe": CrawlerFactory.create(self.crawler)}
        self.search_request_data = {
            "first_name": "John",
            "last_name": "Doe",
            "middle_name": "",
            "birth_date": "02/02/1990"
        }
Пример #5
0
    def setUp(self):

        EndpointShared.setUp(self)