Testing is cool

def test_getProject():
    response = sendReq('getProject', {'project_id': P_ID})
    assert isNotError(response)
    assert response.find('"id":') != -1
def test_dates():
    may_15 = datetime(2007, 5, 15, 0, 0, 0)
    assert DateBlocks().magicDate('15. 5') == may_15

    feb_02 = datetime(2008, 2, 15, 0, 0, 0)
    assert DateBlocks().magicDate('15. 02') == feb_02
py.test makes testing fun.
Code · Python 6. May 2007
© Amir Salihefendic. Powered by Skeletonz.