Now I can show that payment.stripe2.Execute works -- can be invoked in the campaigntest.test_relaunch

pull/1/head
Raymond Yee 2012-09-19 16:45:40 -07:00
parent 05d082604c
commit cf0d6455e4
1 changed files with 12 additions and 2 deletions

View File

@ -190,8 +190,6 @@ def test_relaunch(unglue_it_url = settings.LIVE_SERVER_TEST_URL, do_local=True,
sel.find_element_by_css_selector("input#id_password").send_keys(PASSWORD)
sel.find_element_by_css_selector("input[value*='sign in']").click()
django.db.transaction.commit()
# click on biggest campaign list
# I have no idea why selenium thinks a is not displayed....so that's why I'm going up one element.
# http://stackoverflow.com/a/6141678/7782
@ -243,6 +241,18 @@ def test_relaunch(unglue_it_url = settings.LIVE_SERVER_TEST_URL, do_local=True,
verify_cc_button = WebDriverWait(sel,10).until(lambda d: d.find_element_by_css_selector("input[value*='Verify Credit Card']"))
verify_cc_button.click()
time.sleep(10)
django.db.transaction.commit()
# now use the transaction manager to make the charge
w = models.Work.objects.get(id=48)
c = w.campaigns.all()[0]
pm = PaymentManager()
result = pm.execute_campaign(c)
# should have a Complete transaction
print result
yield sel