def METHOD_NAME(self, mock_cookies_accepted):
    """
    Assert that the analytics scripts correctly receive the CSP nonce.
    Regression test for #1587
    """
    # enable google analytics
    self.config.ga_code = "UA-XXXXX-Y"
    self.config.save()
    form_page = self.app.get(self.url)
    scripts = form_page.pyquery("script[nonce]")
    for script in scripts:
        self.assertTrue(bool(script.attrib["nonce"]))