def test_price_fails_no_currency(cls): ''' method for testing no ccy ''' msg = "URL https://api.mock.com/XBT%s/ticker should have a currency value supplied" with assert_raises(ValueError) as cme: mock.get_current_price(None) ex = cme.exception ok_(ex.message == msg, "error %s should be %s " % (ex.message, msg))