daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest May 31st, 2017 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     """Address object
  2.  
  3.     Verify if the class implements the interfaces:
  4.  
  5.         >>> from zope.interface.verify import verifyClass
  6.         >>> verifyClass(ISenderEmail, SenderEmail)
  7.         True
  8.  
  9.     Create a testing database:
  10.  
  11.         >>> import transaction
  12.         >>> from voipeople.zsqlobject import create_testingdb
  13.         >>> zstorm, store = create_testingdb('voipeople')
  14.  
  15.         >>> from voipeople.content import Account, Address, Department, FaxLine, List
  16.         >>> account = Account(legal_name=u'Kynetix S.r.l.', vat_rate = 20, billing_type_id =1)
  17.         >>> dummy = store.add(account)
  18.         >>> transaction.get().commit()
  19.         >>> address = Address(line1=u'DUMMY', city=u'DUMMY', state=u'DUMMY',
  20.         ...     zip_code=u'00000', country=u'DUMMY', account=account)
  21.         >>> dummy = store.add(address)
  22.         >>> transaction.get().commit()
  23.         >>> list = List(description=u'Voipeople Gold')
  24.         >>> dummy = store.add(list)
  25.         >>> transaction.get().commit()
  26.         >>> department = Department(description=u'DUMMY',
  27.         ...     account=account, address=address)
  28.         >>> dummy = store.add(department)
  29.         >>> transaction.get().commit()
  30.         >>> faxline = FaxLine(username=u'marco', password=u'granata',
  31.         ...      fax_number_id=2,department=department,
  32.         ...      salelist=list, account=account,delivery_email=u'mr@voipeople.it')
  33.         >>> dummy = store.add(faxline)
  34.         >>> email = SenderEmail(email=u'marco@voipeople.it', faxline=faxline )
  35.         >>> dummy = store.add(email)
  36.         >>> transaction.get().commit()
  37.         >>> from zope.interface.verify import verifyObject
  38.         >>> verifyObject(ISenderEmail, email)
  39.         True
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top