def test_copy_table_wrong_credentials(mocker): # When with pytest.raises(ValueError) as e: copy_table('__table_name__', '__new_table_name__', 1234) # Then assert str(e.value) == 'Credentials attribute is required. Please pass a `Credentials` ' + \ 'instance or use the `set_default_credentials` function.'
def test_copy_table_wrong_table_name(mocker): # When with pytest.raises(ValueError) as e: copy_table(1234, '__new_table_name__') # Then assert str( e.value) == 'Wrong table name. You should provide a valid table name.'
def test_copy_table_wrong_if_exists(mocker): # When with pytest.raises(ValueError) as e: copy_table('__table_name__', '__new_table_name__', if_exists='keep_calm') # Then assert str( e.value ) == 'Wrong option for the `if_exists` param. You should provide: fail, replace, append.'