def test_without_ui(self): matches = zpm._find_ui_uploads({}, None) assert matches == zpm._DEFAULT_UI_TEMPLATES
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']