| Conditions | 1 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # -*- coding: utf-8 -*- |
||
| 9 | @patch('shutil.copy') |
||
| 10 | @patch('glob.glob') |
||
| 11 | def test_filecopy(self, glob, shutil_copy): |
||
| 12 | glob.return_value = ('one', 'two', 'three', 'four') |
||
| 13 | |||
| 14 | cli_tool = LambdahelperBundler() |
||
| 15 | cli_tool.target_directory = 'target' |
||
| 16 | cli_tool.working_directory = 'working' |
||
| 17 | cli_tool.requirements_path = 'reqs' |
||
| 18 | cli_tool.copy_lambda_package_files() |
||
| 19 | |||
| 20 | shutil_copy.assert_has_calls([ |
||
| 21 | call('one', 'working'), |
||
| 22 | call('two', 'working'), |
||
| 23 | call('three', 'working'), |
||
| 24 | call('four', 'working'), |
||
| 25 | call('reqs', 'working') |
||
| 26 | ]) |
||
| 27 | |||
| 28 | self.assertEqual(shutil_copy.call_count, 5) |
||
| 29 |