def login(self, username, password):
        """
        Login to HB API and store a valid X-AUTH-TOKEN.
        """
        r = self.client.post(path=api_url + "/auth/login",
                             data=json.dumps({'username': username, 'password': password}),
                             content_type="application/json")
        if r._headers in 'x-auth-token':
            self.x_auth_token = r._headers['x-auth-token'][1]
            return True
        else:
            self.x_auth_token = None
            return False
dataset/ETHPy150Open emccode/heliosburn/heliosburn/django/hbproject/api/tests.py/APITestCase.login/swapped operands of `in`