scripts/notebooks/test.py
def testAccessTokenErrorCatch(self, mock_stdout):
        """
        Test access token function catch error with token value
        """
        access_token = BT_mining_script_for_testing.access_token
        
        ## fake access token
        data = ['12345678932165498774185296332145987555']
        expected_output = "Please provide a working access token\n"

        access_token(data[0])             
        self.assertEqual(mock_stdout.getvalue(), expected_output, "another type of error not related to access token ")

        Test access token function catch error with token value
        
Test access token function catch error with token value
Test access token function catch error with token value
def testAccessTokenErrorCatch(self, mock_stdout):
        access_token = BT_mining_script_for_testing.access_token
        data = ['12345678932165498774185296332145987555']
        expected_output = "Please provide a working access token\n"
        access_token(data[0])             
        self.assertEqual(mock_stdout.getvalue(), expected_output, "another type of error not related to access token ")
def testAccessTokenErrorCatch ( self , mock_stdout ) : access_token = BT_mining_script_for_testing . access_token data = [ '12345678932165498774185296332145987555' ] expected_output = "Please provide a working access token\n" access_token ( data [ 0 ] ) self . assertEqual ( mock_stdout . getvalue ( ) , expected_output , "another type of error not related to access token " )
Test access token function catch error with token value
Test access token function catch error with token value
"""
        Test access token function catch error with token value
        """ ## fake access token
self
mock_stdout