- Timestamp:
- 30 Jan 2015, 07:48:39 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12517 r12521 127 127 customer.reg_number = u'123' 128 128 customer.sex = u'm' 129 customer.email = 'aa@aa.ng'129 customer.email = u'aa@aa.ng' 130 130 customer.phone = u'1234' 131 131 customer.date_of_birth = date(1981, 2, 4) … … 210 210 self.browser.getControl(name="form.reg_number").value = '123' 211 211 self.browser.getControl("Create customer record").click() 212 self.assertTrue('Registration number exists already'212 self.assertTrue('Registration number does exist.' 213 213 in self.browser.contents) 214 214 self.browser.getControl(name="form.reg_number").value = '1234' … … 220 220 self.browser.getControl(name="form.reg_number").value = '123' 221 221 self.browser.getControl("Save").click() 222 self.assertMatches('...Registration number exists...',222 self.assertMatches('...Registration number does exist...', 223 223 self.browser.contents) 224 224 … … 358 358 self.browser.getControl("Send message now").click() 359 359 self.assertTrue('An smtp server error occurred' in self.browser.contents) 360 self.customer.email = 'xx@yy.zz'360 self.customer.email = u'xx@yy.zz' 361 361 self.browser.getControl("Send message now").click() 362 362 self.assertTrue('Your message has been sent' in self.browser.contents) … … 420 420 open('customers.csv', 'wb').write( 421 421 """firstname,lastname,reg_number,date_of_birth,email,phone,sex,password 422 Aaren,Pieri,1,1990-01-02, aa@aa.ng,1234,m,mypwd1423 Claus,Finau,2,1990-01-03, aa@aa.ng,1234,m,mypwd1424 Brit,Berson,2,1990-01-04, aa@aa.ng,1234,m,mypwd1422 Aaren,Pieri,1,1990-01-02,bb@aa.ng,1234,m,mypwd1 423 Claus,Finau,2,1990-01-03,cc@aa.ng,1234,m,mypwd1 424 Brit,Berson,2,1990-01-04,dd@aa.ng,1234,m,mypwd1 425 425 """) 426 426 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') … … 766 766 767 767 def test_create_account(self): 768 # Customer with wrong number can't be found.769 768 self.browser.open('http://localhost/app/createaccount') 770 769 self.browser.getControl(name="form.firstname").value = 'Ruben' 771 770 self.browser.getControl(name="form.lastname").value = 'Gonzales' 771 self.browser.getControl(name="form.email").value = 'aa@aa.ng' 772 self.browser.getControl("Send login credentials").click() 773 # Email address exists. 774 self.assertTrue('Email address does exist.' in self.browser.contents) 772 775 self.browser.getControl(name="form.email").value = 'newcustomer@xx.zz' 773 776 self.browser.getControl("Send login credentials").click() 774 self.assertTrue('Your request was successful.' 775 in self.browser.contents) 776 # ... and customer can be found in the catalog via the email address 777 self.assertTrue('Your request was successful.' in self.browser.contents) 778 # Customer can be found in the catalog via the email address 777 779 cat = queryUtility(ICatalog, name='customers_catalog') 778 780 results = list(
Note: See TracChangeset for help on using the changeset viewer.