Make sure it succeeds with _OK_

This commit is contained in:
Jean-Paul Calderone 2019-03-22 16:43:08 -04:00
parent febfa50a83
commit 5ac7efc6f3

View File

@ -10,12 +10,16 @@ from __future__ import (
) )
from testtools.matchers import ( from testtools.matchers import (
Always, Equals,
) )
from testtools.twistedsupport import ( from testtools.twistedsupport import (
succeeded, succeeded,
) )
from twisted.web.http import (
OK,
)
from treq.client import ( from treq.client import (
HTTPClient, HTTPClient,
) )
@ -23,6 +27,10 @@ from treq.testing import (
RequestTraversalAgent, RequestTraversalAgent,
) )
from .matchers import (
has_response_code,
)
from ..common import ( from ..common import (
SyncTestCase, SyncTestCase,
) )
@ -47,5 +55,5 @@ class StreamingEliotLogsTests(SyncTestCase):
""" """
self.assertThat( self.assertThat(
self.client.head(b"http:///logs/v1"), self.client.head(b"http:///logs/v1"),
succeeded(Always()), succeeded(has_response_code(Equals(OK))),
) )