Ejemplo n.º 1
0
def check_auth(token, user, mode):
    if(user == "" or token == ""):
        error_message("Error: Username or Token Left Blank")
        return "Error: Username or Token Left Blank"
    auth = authenticate.Authenticate(token, user)
    profile = auth.get_profile()
    if('message' in profile):
        error_message("Error: Bad Credentials")
        print(profile)
        return profile
    if(mode):
        toggle = PreferenceToggle()
        toggle.window_preference(user)
    else:
        gen_comment_list(token, user, auth)
    return True
 def test_repo_correct_org_correct(self):
     auth = authenticate.Authenticate('Nanosoft1*', 'raphaeljunior')
     panel_data = test_credentials.load_quick_panel_data(
         auth, 'ADI-Labs', 'culpa2')
     self.assertListEqual(panel_data, self.mock_panel_list())