Example #1
0
 def test_empty(self, input_):
     with httmock.HTTMock(self.fake_response(input_)):
         assert list(fetch_networks("http://fake.url")) == []
 def test_empty(self, input_):
     with httmock.HTTMock(self.fake_response(input_)):
         assert list(fetch_networks("http://fake.url")) == []
Example #3
0
    def test_ok(self):
        with httmock.HTTMock(self.fake_response(self.FAKE_CONTENT)):
            networks = [str(ntw) for ntw in fetch_networks("http://fake.url")]

        assert set(networks) == set(self.FAKE_NETWORKS)
    def test_ok(self):
        with httmock.HTTMock(self.fake_response(self.FAKE_CONTENT)):
            networks = [str(ntw) for ntw in fetch_networks("http://fake.url")]

        assert set(networks) == set(self.FAKE_NETWORKS)