Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into req_pinning
Browse files Browse the repository at this point in the history
  • Loading branch information
Joonas Nikula committed Jan 28, 2019
2 parents f2b1fba + 4d82487 commit eb33b0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ def test_build_file(self):
with self.assertRaises(NotFoundError):
build.get_data()

def test_build_http(self, ):
@mock.patch("icetea_lib.build.build.requests.get")
def test_build_http(self, mocked_get):
mocked_get.return_value = mock.MagicMock()
type(mocked_get).content = mock.PropertyMock(return_value="\r")
build = Build.init("http://www.hep.com")
self.assertEqual(build.get_type(), "http")
self.assertEqual(build.get_url(), "http://www.hep.com")

build = Build.init("http://tools.ietf.org/rfc/rfc7583.txt")
self.assertEqual(build.get_type(), "http")
self.assertTrue(build.get_data(), "\r")

@mock.patch("icetea_lib.build.build.requests.get",
Expand Down

0 comments on commit eb33b0a

Please sign in to comment.