@pytest.yield_fixture(params=[None, tdata])
def temp_add_server(request):
 data = request.param
 s = Server(copy(data), formats=all_formats, allow_add=True)
 s.app.testing = True
 with s.app.test_client() as c:
  (yield c)

@ pytest . yield_fixture ( params = [ None , tdata ] ) def temp_add_server ( request ) : data = request . param s = Server ( copy ( data ) , formats = all_formats , allow_add = True ) s . app . testing = True with s . app . test_client ( ) as c : ( yield c )
for when we want to mutate the server .