net: fix test_download_file_url_parsing

self.assertTrue(requests_get.called) will always be true because .called
will contain a MagicMock instance.
This commit is contained in:
Hans-Christoph Steiner 2024-02-27 16:35:56 +01:00
parent 7904f12d05
commit 9749282b44
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class NetTest(unittest.TestCase):
requests_get.side_effect = _get
f = net.download_file('https://f-droid.org/repo/entry.jar', retries=0)
self.assertTrue(requests_get.called)
requests_get.assert_called()
self.assertTrue(os.path.exists(f))
self.assertEqual('tmp/entry.jar', f)