Skip to content

Commit

Permalink
Add small test
Browse files Browse the repository at this point in the history
  • Loading branch information
Some User committed Feb 25, 2022
1 parent 4c41bae commit ad1fe8f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/grab_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,11 @@ def test_invalid_transport_invalid_path(self):
def test_invalid_transport_not_collable_or_string(self):
with self.assertRaises(GrabMisuseError):
Grab(transport=13).go(self.server.get_url())

def test_setup_transport_twice(self):
transport = "grab.transport.curl.CurlTransport"
grab = Grab()
grab.setup_transport(transport)
with self.assertRaises(GrabMisuseError) as ex:
grab.setup_transport(transport)
self.assertTrue("Transport is already set up" in str(ex.exception))

0 comments on commit ad1fe8f

Please sign in to comment.