예제 #1
0
def test_store_error_stores_ach_error():
    with foo_user():
        for message in ['cheese is yummy', 'cheese smells like my vibrams']:
            billing.store_error(u"bank account", 'foo', message)
            rec = gittip.db.fetchone("select * from participants "
                                     "where id='foo'")
            assert rec['last_ach_result'] == message
예제 #2
0
def test_store_error_stores_ach_error():
    with foo_user():
        for message in ['cheese is yummy', 'cheese smells like my vibrams']:
            billing.store_error(u"bank account", 'foo', message)
            rec = gittip.db.fetchone("select * from participants "
                                     "where id='foo'")
            assert rec['last_ach_result'] == message
예제 #3
0
def test_store_error_stores_bill_error():
    with foo_user():
        billing.store_error(u"credit card", "foo", "cheese is yummy")
        rec = gittip.db.fetchone("select * from participants where id='foo'")
        expected = "cheese is yummy"
        actual = rec['last_bill_result']
        assert actual == expected, actual
예제 #4
0
 def test_store_error_stores_bill_error(self):
     billing.store_error(u"credit card", "alice", "cheese is yummy")
     rec = gittip.db.one("select * from participants where "
                         "username='******'")
     expected = "cheese is yummy"
     actual = rec.last_bill_result
     assert actual == expected, actual
예제 #5
0
 def test_store_error_stores_bill_error(self):
     billing.store_error(self.db, u"credit card", "alice", "cheese is yummy")
     rec = self.db.one("select * from participants where "
                         "username='******'")
     expected = "cheese is yummy"
     actual = rec.last_bill_result
     assert actual == expected
예제 #6
0
 def test_store_error_stores_bill_error(self):
     billing.store_error(u"credit card", "alice", "cheese is yummy")
     rec = gittip.db.fetchone("select * from participants where "
                              "username='******'")
     expected = "cheese is yummy"
     actual = rec['last_bill_result']
     assert actual == expected, actual
예제 #7
0
def test_store_error_stores_bill_error():
    with foo_user():
        billing.store_error(u"credit card", "foo", "cheese is yummy")
        rec = gittip.db.fetchone("select * from participants where id='foo'")
        expected = "cheese is yummy"
        actual = rec['last_bill_result']
        assert actual == expected, actual
예제 #8
0
 def test_store_error_stores_ach_error(self):
     for message in ['cheese is yummy', 'cheese smells like my vibrams']:
         billing.store_error(u"bank account", 'alice', message)
         rec = gittip.db.one("select * from participants "
                             "where username='******'")
         assert rec.last_ach_result == message
예제 #9
0
 def test_store_error_stores_ach_error(self):
     for message in ['cheese is yummy', 'cheese smells like my vibrams']:
         billing.store_error(self.db, u"bank account", 'alice', message)
         rec = self.db.one("select * from participants "
                             "where username='******'")
         assert rec.last_ach_result == message
예제 #10
0
 def test_store_ach_error(self):
     for message in ['cheese is yummy', 'cheese smells like my vibrams']:
         billing.store_error(u"bank account", self.participant_id, message)
         rec = self.db.fetchone("select * from participants where id=%s",
             (self.participant_id,))
         self.assertEqual(rec['last_ach_result'], message)
예제 #11
0
 def test_store_error_stores_error(self):
     billing.store_error(u"credit card", "lgtest", "cheese is yummy")
     rec = self.db.fetchone("select * from participants where id='lgtest'")
     self.assertEqual(rec['last_bill_result'], "cheese is yummy")
예제 #12
0
 def test_store_error_stores_ach_error(self):
     for message in ["cheese is yummy", "cheese smells like my vibrams"]:
         billing.store_error("bank account", "alice", message)
         rec = gittip.db.one("select * from participants " "where username='******'")
         assert rec["last_ach_result"] == message
예제 #13
0
 def test_store_ach_error(self):
     for message in ['cheese is yummy', 'cheese smells like my vibrams']:
         billing.store_error(u"bank account", self.participant_id, message)
         rec = self.db.fetchone("select * from participants where id=%s",
                                (self.participant_id, ))
         self.assertEqual(rec['last_ach_result'], message)
예제 #14
0
 def test_store_error_stores_error(self):
     billing.store_error(u"credit card", "lgtest", "cheese is yummy")
     rec = self.db.fetchone("select * from participants where id='lgtest'")
     self.assertEqual(rec['last_bill_result'], "cheese is yummy")