'Authenticated users can request no-cache for kumascript'

@override_config(KUMASCRIPT_TIMEOUT=1.0, KUMASCRIPT_MAX_AGE=1234)
@requests_mock.mock()
def test_ua_no_cache(self, mock_requests):

    mock_requests.get(requests_mock.ANY, [dict(content='HELLO    WORLD'), ks_toolbox().macros_response])
    self.client.get(self.url, follow=False, HTTP_CACHE_CONTROL='no-cache')
    eq_(mock_requests.request_history[0].headers['Cache-Control'], 'max-age=1234')
    self.client.login(username='admin', password='testpass')
    self.client.get(self.url, follow=False, HTTP_CACHE_CONTROL='no-cache')
    eq_(mock_requests.request_history[1].headers['Cache-Control'], 'no-cache')
