def test_list(self):
# check a basic listing returns the items we expect
- ls = [f['name'] for f in self.conn.list(addom)]
+ ls = [f['name'] for f in self.smb_conn.list(addom)]
self.assertIn('scripts', ls,
msg='"scripts" directory not found in sysvol')
self.assertIn('Policies', ls,
msg='Current dir (.) found in directory listing')
# using a '*' mask should be the same as using no mask
- ls_wildcard = [f['name'] for f in self.conn.list(addom, "*")]
+ ls_wildcard = [f['name'] for f in self.smb_conn.list(addom, "*")]
self.assertEqual(ls, ls_wildcard)
# applying a mask should only return items that match that mask
- ls_pol = [f['name'] for f in self.conn.list(addom, "Pol*")]
+ ls_pol = [f['name'] for f in self.smb_conn.list(addom, "Pol*")]
expected = ["Policies"]
self.assertEqual(ls_pol, expected)
PyObject *file = NULL;
int ret;
+ /* suppress '.' and '..' in the results we return */
+ if (ISDOT(finfo->name) || ISDOTDOT(finfo->name)) {
+ return NT_STATUS_OK;
+ }
+
file = Py_BuildValue("{s:s,s:i}",
"name", finfo->name,
"mode", (int)finfo->mode);