def METHOD_NAME(self):
    mock_session = mock.Mock()
    mock_response = mock.Mock()
    mock_response.content = '"applesKey": "1234",'.encode("utf-8")
    mock_session.get.return_value = mock_response
    with self.assertRaises(RaceCardError):
        self.race_card.login(mock_session)
    assert self.race_card.app_key is None
    mock_session.get.assert_called_with(self.race_card.login_url)
    assert mock_session.get.call_count == 1