@patch('requests.get')
    def test_unauthorized_expired(self, r_get):
        # Verified response from the live API
        r_get.return_value = Mock(
            status_code=401,
            text="oauth_problem=token_expired&oauth_problem_advice=The%20access%20token%20has%20expired"
        )

        credentials = Mock(base_url="")
        xero = Xero(credentials)

        try:
            xero.contacts.all()
            self.fail("Should raise a XeroUnauthorized.")

        except XeroUnauthorized as e:
            # Error messages have been extracted
            self.assertEqual(str(e), 'The access token has expired')
            self.assertEqual(e.errors[0], 'token_expired')

            # The response has also been stored
            self.assertEqual(e.response.status_code, 401)
            self.assertEqual(e.response.text, 'oauth_problem=token_expired&oauth_problem_advice=The%20access%20token%20has%20expired')
        except Exception as e:
            self.fail("Should raise a XeroUnauthorized, not %s" % e)
get_current_theme() -> subclass of DefaultTheme
dataset/ETHPy150Open freakboy3742/pyxero/tests/exceptions.py/ExceptionsTest.test_unauthorized_expired--crossover with--dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/theme.py/get_current_theme