|
@@ -79,7 +79,7 @@ class TestWebDav(TestStandard):
|
79
|
79
|
ok_(root, msg='Path / should return a Root instance')
|
80
|
80
|
ok_(isinstance(root, Root))
|
81
|
81
|
|
82
|
|
- def test_unit__list_workspaces_with_admin__ok(self):
|
|
82
|
+ def test_unit__list_workspaces_with_user__ok(self):
|
83
|
83
|
provider = self._get_provider()
|
84
|
84
|
root = provider.getResourceInst(
|
85
|
85
|
'/',
|
|
@@ -108,6 +108,35 @@ class TestWebDav(TestStandard):
|
108
|
108
|
workspaces_names,
|
109
|
109
|
))
|
110
|
110
|
|
|
111
|
+ def test_unit__list_workspaces_with_admin__ok(self):
|
|
112
|
+ provider = self._get_provider()
|
|
113
|
+ root = provider.getResourceInst(
|
|
114
|
+ '/',
|
|
115
|
+ self._get_environ(
|
|
116
|
+ provider,
|
|
117
|
+ 'admin@admin.admin',
|
|
118
|
+ )
|
|
119
|
+ )
|
|
120
|
+ ok_(root, msg='Path / should return a Root instance')
|
|
121
|
+ ok_(isinstance(root, Root), msg='Path / should return a Root instance')
|
|
122
|
+
|
|
123
|
+ children = root.getMemberList()
|
|
124
|
+ eq_(
|
|
125
|
+ 2,
|
|
126
|
+ len(children),
|
|
127
|
+ msg='Root should return 2 workspaces instead {0}'.format(
|
|
128
|
+ len(children),
|
|
129
|
+ )
|
|
130
|
+ )
|
|
131
|
+
|
|
132
|
+ workspaces_names = [w.name for w in children]
|
|
133
|
+ ok_('w1' in workspaces_names, msg='w1 should be in names ({0})'.format(
|
|
134
|
+ workspaces_names,
|
|
135
|
+ ))
|
|
136
|
+ ok_('w3' in workspaces_names, msg='w3 should be in names ({0})'.format(
|
|
137
|
+ workspaces_names,
|
|
138
|
+ ))
|
|
139
|
+
|
111
|
140
|
def test_unit__list_workspace_folders__ok(self):
|
112
|
141
|
provider = self._get_provider()
|
113
|
142
|
w1 = provider.getResourceInst(
|