jeudi 2 juin 2016

Mock Python impala ibis database

I am trying to mock an impala ibis database so that my unit-tests don't connect to the DB every time. But my unit-test shows the following message then exits with no error message or any sign of running the test case. Since it doesn't print anything or show any error message, I don't know how to find what the problem is.

Patching ibis classes...

Will appreciate any kind of help.

@patch("impala.ibis_context", side_effect=fake_ibis_context_visits_table)
@patch("impala.client.ImpalaTable.filter")
def test_make_visits_tables(self):
    print '----------------------running test--------------------\n'
    some_function_using_impala()

Aucun commentaire:

Enregistrer un commentaire