Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jneves committed Feb 15, 2020
1 parent 2bd3b4d commit b15919a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ def test_get_manylinux_python37(self):
def test_get_manylinux_python38(self):
z = Zappa(runtime='python3.8')
self.assertIsNotNone(z.get_cached_manylinux_wheel('psycopg2-binary', '2.8.4'))
# ABI3 but not cp38
self.assertIsNotNone(z.get_cached_manylinux_wheel('cryptography', '2.8'))
self.assertIsNone(z.get_cached_manylinux_wheel('derp_no_such_thing', '0.0'))

# mock with a known manylinux wheel package so that code for downloading them gets invoked
Expand All @@ -176,6 +174,14 @@ def test_get_manylinux_python38(self):
self.assertTrue(os.path.isfile(path))
os.remove(path)

# same, but with an ABI3 package
mock_installed_packages = {'cryptography': '2.8'}
with mock.patch('zappa.core.Zappa.get_installed_packages', return_value=mock_installed_packages):
z = Zappa(runtime='python3.8')
path = z.create_lambda_zip(handler_file=os.path.realpath(__file__))
self.assertTrue(os.path.isfile(path))
os.remove(path)

def test_should_use_lambda_packages(self):
z = Zappa(runtime='python2.7')

Expand Down

0 comments on commit b15919a

Please sign in to comment.