11from __future__ import absolute_import
22
3- import py . test
3+ import pytest
44import socket
55import time
66
99import riemann_client .transport
1010
1111
12- @py . test .fixture
12+ @pytest .fixture
1313def blank_transport ():
1414 return riemann_client .transport .BlankTransport ()
1515
@@ -25,12 +25,12 @@ def send(self, *args, **kwargs):
2525 raise socket .error (32 , '[Errno 32] Broken pipe' )
2626
2727
28- @py . test .fixture
28+ @pytest .fixture
2929def broken_transport ():
3030 return BrokenTransport ()
3131
3232
33- @py . test .fixture
33+ @pytest .fixture
3434def auto_flushing_queued_client (request , blank_transport ):
3535 """A Riemann client using the StringIO transport and
3636 AutoFlushingQueuedClient with max_delay=300 and
@@ -49,7 +49,7 @@ def disconnect():
4949 return client
5050
5151
52- @py . test .fixture
52+ @pytest .fixture
5353def auto_flushing_queued_client_delay (request , blank_transport ):
5454 """A Riemann client using the StringIO transport and
5555 AutoFlushingQueuedClient with max_delay=1 and
@@ -68,7 +68,7 @@ def disconnect():
6868 return client
6969
7070
71- @py . test .fixture
71+ @pytest .fixture
7272def auto_flushing_queued_client_batch5 (request , blank_transport ):
7373 """A Riemann client using the StringIO transport and
7474 AutoFlushingQueuedClient with max_delay=300 and
@@ -87,7 +87,7 @@ def disconnect():
8787 return client
8888
8989
90- @py . test .fixture
90+ @pytest .fixture
9191def auto_flushing_queued_client_batch5_broken_f (request , broken_transport ):
9292 """A Riemann client using the StringIO transport and
9393 AutoFlushingQueuedClient with max_delay=300 and
@@ -107,7 +107,7 @@ def disconnect():
107107 return client
108108
109109
110- @py . test .fixture
110+ @pytest .fixture
111111def auto_flushing_queued_client_batch5_broken_t (request , broken_transport ):
112112 """A Riemann client using the StringIO transport and
113113 AutoFlushingQueuedClient with max_delay=300 and
@@ -127,13 +127,13 @@ def disconnect():
127127 return client
128128
129129
130- @py . test .fixture
130+ @pytest .fixture
131131def using_simple_queue (auto_flushing_queued_client ):
132132 """An event queue with a single event"""
133133 auto_flushing_queued_client .event (service = 'test' )
134134
135135
136- @py . test .fixture
136+ @pytest .fixture
137137def large_queue (auto_flushing_queued_client ):
138138 """An event queue with 100 events"""
139139 items = ['-->{0}<--' .format (i ) for i in range (0 , 1000 )]
0 commit comments