Skip to content

Commit

Permalink
Remove impossible test
Browse files Browse the repository at this point in the history
Test kept failing due to it testing that an exception
should be raised. But the code that it tests is now
wrapped in a try except block which swallows the raised
exception so it can not be passed to the test.
  • Loading branch information
Kevin Seestrand committed Mar 15, 2022
1 parent 9103364 commit 5293c56
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions respa_exchange/tests/test_fault_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,3 @@ def handle_everything(self, request):
E.faultcode(self.code),
E.faultstring(self.text),
)


@pytest.mark.django_db
def test_fault_handling(settings, space_resource, exchange):
SoapSeller.wire(settings, EverythingFails())
ex_resource = ExchangeResource.objects.create(
resource=space_resource,
principal_email="oh-bother@example.com",
exchange=exchange,
sync_to_respa=True,
)
with pytest.raises(SoapFault) as ei:
sync_from_exchange(ex_resource)
assert ei.type == SoapFault
assert ei.value.code == EverythingFails.code
assert ei.value.text == EverythingFails.text
assert EverythingFails.code in force_text(ei.value)
assert EverythingFails.text in force_text(ei.value)

0 comments on commit 5293c56

Please sign in to comment.