Ejemplo n.º 1
0
 def test_get_credentials(self):
     session_credentials = session.get_session_credentials()
     if 'username' in session_credentials:
         del session._session['credentials']['username']
     if 'api_key' in session_credentials:
         del session._session['credentials']['api_key']
     creds = py.get_credentials()
     file_creds = tls.get_credentials_file()
     self.assertEqual(creds, file_creds)
Ejemplo n.º 2
0
 def test_get_credentials(self):
     session_credentials = session.get_session_credentials()
     if 'username' in session_credentials:
         del session._session['credentials']['username']
     if 'api_key' in session_credentials:
         del session._session['credentials']['api_key']
     creds = py.get_credentials()
     file_creds = tls.get_credentials_file()
     self.assertEqual(creds, file_creds)
Ejemplo n.º 3
0
def get_credentials():
    """Returns the credentials that will be sent to plotly."""
    credentials = tools.get_credentials_file()
    session_credentials = get_session_credentials()
    for credentials_key in credentials:

        # checking for not false, but truthy value here is the desired behavior
        session_value = session_credentials.get(credentials_key)
        if session_value is False or session_value:
            credentials[credentials_key] = session_value
    return credentials
Ejemplo n.º 4
0
def get_credentials():
    """Returns the credentials that will be sent to plotly."""
    credentials = tools.get_credentials_file()
    session_credentials = get_session_credentials()
    for credentials_key in credentials:

        # checking for not false, but truthy value here is the desired behavior
        session_value = session_credentials.get(credentials_key)
        if session_value is False or session_value:
            credentials[credentials_key] = session_value
    return credentials
Ejemplo n.º 5
0
def test_get_credentials():
    session_credentials = session.get_session_credentials()
    if 'username' in session_credentials:
        del session._session['credentials']['username']
    if 'api_key' in session_credentials:
        del session._session['credentials']['api_key']
    creds = py.get_credentials()
    file_creds = tls.get_credentials_file()
    print(creds)
    print(file_creds)
    assert creds == file_creds
Ejemplo n.º 6
0
def test_get_credentials():
    session_credentials = session.get_session_credentials()
    if 'username' in session_credentials:
        del session._session['credentials']['username']
    if 'api_key' in session_credentials:
        del session._session['credentials']['api_key']
    creds = py.get_credentials()
    file_creds = tls.get_credentials_file()
    print(creds)
    print(file_creds)
    assert creds == file_creds