Change assertRaises by pytest.raises (for travis)