from cStringIO import StringIO

default_conf=StringIO("""[general]
#will be set automatically
metadata = 
accounts = test
ui = quiet

[Account test]
localrepository = Maildir
remoterepository = IMAP

[Repository Maildir]
Type = Maildir
# will be set automatically during tests
localfolders = 

[Repository IMAP]
type=IMAP
folderfilter= lambda f: f.startswith('INBOX.OLItest')
""")

from cStringIO import StringIO

default_conf=StringIO("""[general]
#will be set automatically
metadata = 
accounts = test
ui = quiet

[Account test]
localrepository = Maildir
remoterepository = IMAP

[Repository Maildir]
Type = Maildir
# will be set automatically during tests
localfolders = 

[Repository IMAP]
type=IMAP
# Don't hammer the server with too many connection attempts:
maxconnections=1
folderfilter= lambda f: f.startswith('INBOX.OLItest')
""")

Use only 1 IMAP connection by default
tests: Use only 1 IMAP connection by default

We don't want to hammmer IMAP servers for the test series too much
to avoid being locked out. We will need a few tests to test
concurrent connections, but by default one connection should be fine.

Signed-off-by: Sebastian Spaeth <98dcb2717ddae152d5b359c6ea97e4fe34a29d4c@SSpaeth.de>

  from cStringIO import StringIO
  
  default_conf=StringIO("""[general]
  #will be set automatically
  metadata = 
  accounts = test
  ui = quiet
  
  [Account test]
  localrepository = Maildir
  remoterepository = IMAP
  
  [Repository Maildir]
  Type = Maildir
  # will be set automatically during tests
  localfolders = 
  
  [Repository IMAP]
  type=IMAP
+ # Don't hammer the server with too many connection attempts:
+ maxconnections=1
  folderfilter= lambda f: f.startswith('INBOX.OLItest')
  """)
  
Use only 1 IMAP connection by default
## Code Before:
from cStringIO import StringIO

default_conf=StringIO("""[general]
#will be set automatically
metadata = 
accounts = test
ui = quiet

[Account test]
localrepository = Maildir
remoterepository = IMAP

[Repository Maildir]
Type = Maildir
# will be set automatically during tests
localfolders = 

[Repository IMAP]
type=IMAP
folderfilter= lambda f: f.startswith('INBOX.OLItest')
""")

## Instruction:
Use only 1 IMAP connection by default
## Code After:
from cStringIO import StringIO

default_conf=StringIO("""[general]
#will be set automatically
metadata = 
accounts = test
ui = quiet

[Account test]
localrepository = Maildir
remoterepository = IMAP

[Repository Maildir]
Type = Maildir
# will be set automatically during tests
localfolders = 

[Repository IMAP]
type=IMAP
# Don't hammer the server with too many connection attempts:
maxconnections=1
folderfilter= lambda f: f.startswith('INBOX.OLItest')
""")
