Not all scripts we load are from our domain.  We load some scripts where
the src attribute points to some third party ssl server.

We are only concerned with verifying that scripts loaded out of our own
static directory have hashes appended to them.
On 30 Nov 2013 07:47, "Florian Rathgeber" <notifications@github.com> wrote:

> In oabutton/apps/web/tests.py:
>
> >      @patch('oabutton.apps.bookmarklet.models.OAEvent', MockOAEvent)
> >      def test_count_denied_pursuits(self):
> >          response = self.client.get('/')
> >          eq_(response.context['count'], 2)
> >
> > -        content = re.sub(r'\s+', ' ', response.content)
> > -        ok_(content.find(r"""<span id="counter">2 </span><span>Paywalls Hit </span>""") != -1)
> > +        soup = BeautifulSoup.BeautifulSoup(response.content)
> > +        node = soup.find('span', attrs={'id': 'counter'})
> > +        eq_(node.text, '2')
> > +        eq_(node.nextSibling.text, u'Paywalls Hit')
> > +
> > +    @patch('oabutton.apps.bookmarklet.models.OAEvent', MockOAEvent)
> > +    def test_versioned_static_content(self):
> > +        response = self.client.get('/')
> > +        soup = BeautifulSoup.BeautifulSoup(response.content)
> > +        scripts = [s for s in soup.findAll('script') if s.has_key('src')]  # NOQA
>
> I still don't understand: this is a no-op since you're immediately
> overwrite scripts on the next line (which is what flake8 catches).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/OAButton/OAButton/pull/198/files#r8010864>
> .
>