Permalink
Browse files

update gitignore

  • Loading branch information...
1 parent ff91c78 commit b8a7a400b3d1d023b880f50901ad6ddbce01b45d @gaubert committed Jan 3, 2012
Showing with 35 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +34 −2 src/gmvault_tests.py
View
@@ -2,5 +2,6 @@
*.pyc
*.o
*.class
+gmvault.log
dists/disstoolbox-dist/build
dists/disstoolbox-dist/build/*
View
@@ -55,7 +55,7 @@ def __init__(self, stuff):
def setUp(self):
self.login, self.passwd = read_password_file('/homespace/gaubert/.ssh/passwd')
- #self.gmvault_login, self.gmvault_passwd = read_password_file('/homespace/gaubert/.ssh/gsync_passwd')
+ self.gmvault_login, self.gmvault_passwd = read_password_file('/homespace/gaubert/.ssh/gsync_passwd')
def ztest_gmvault_connect_error(self):
@@ -107,6 +107,38 @@ def ztest_gmvault_compression(self):
self.assertEquals(len(ids), 33629)
+ def test_created_nested_dirs(self):
+ """ Try to create nested dirs """
+ client = gmvault.MonkeyIMAPClient('imap.gmail.com', port = 993, use_uid = True, ssl= True)
+
+ client.login(self.gmvault_login, self.gmvault_passwd)
+
+ #res = client.xlist_folders()
+
+ #print(res)
+
+ folders_info = client.list_folders()
+
+ print(folders_info)
+
+ folders = [ dir for (i, parent, dir) in folders_info ]
+
+ print('folders %s\n' %(folders))
+ dir = 'ECMWF-Archive'
+ #dir = 'test'
+ if dir not in folders:
+ res = client.create_folder(dir)
+ print(res)
+
+ folders = [ dir for (i, parent, dir) in folders_info ]
+
+ print('folders %s\n' %(folders))
+ dir = 'ECMWF-Archive/ecmwf-simdat'
+ #dir = 'test/test-1'
+ if dir not in folders:
+ res = client.create_folder(dir)
+ print(res)
+
def ztest_gmvault_simple_search(self):
"""
search all emails before 01.01.2005
@@ -503,7 +535,7 @@ def ztest_full_sync_gmv(self):
#clean db dir
delete_db_dir(args['db-dir'])
- def test_delete_sync_gmv(self):
+ def ztest_delete_sync_gmv(self):
"""
delete sync via command line
"""

0 comments on commit b8a7a40

Please sign in to comment.