def METHOD_NAME(self):
    """
    Assert that configured theme stylesheets are loaded in the correct order.
    """
    self.config.theme_stylesheet = "https://example.com/theme.css"
    self.config.theme_stylesheet_file = File(
        BytesIO(b".foo{display: block;}"), name="my-theme.css"
    )
    self.config.save()
    form_page = self.app.get(self.url)
    # look up the last two stylesheet links in the page
    stylesheet_links = [
        link for link in form_page.pyquery('link[rel="stylesheet"]')
    ][-2:]
    self.assertEqual(
        stylesheet_links[0].attrib["href"], "https://example.com/theme.css"
    )
    self.assertEqual(
        stylesheet_links[1].attrib["href"],
        self.config.theme_stylesheet_file.url,
    )