Exemple #1
0
 def test_without_ui(self):
     matches = zpm._find_ui_uploads({}, None)
     assert matches == zpm._DEFAULT_UI_TEMPLATES
Exemple #2
0
 def test_with_glob(self):
     zapp = {'ui': ['x', 'ui/*']}
     tar = mock.Mock(getnames=lambda: ['x', 'y', 'ui/x', 'ui/y'])
     matches = zpm._find_ui_uploads(zapp, tar)
     assert sorted(matches) == ['ui/x', 'ui/y', 'x']
Exemple #3
0
 def test_with_glob(self):
     zapp = {'ui': ['x', 'ui/*']}
     tar = mock.Mock(getnames=lambda: ['x', 'y', 'ui/x', 'ui/y'])
     matches = zpm._find_ui_uploads(zapp, tar)
     assert sorted(matches) == ['ui/x', 'ui/y', 'x']