def METHOD_NAME(self):
    """Test that cleanup of config and slot of deleted postgres tap takes place"""
    old_config = {
        'targets': [
            {
                'id': 'target_one',
                'type': 'target-snowflake',
                'taps': [dict(id='tap_one', type='tap-mysql'), dict(id='tap_two', type='tap-postgres')]
            },
            {
                'id': 'target_two',
                'type': 'target-s3-csv',
                'taps': [dict(id='tap_three', type='tap-mysql'), dict(id='tap_four', type='tap-postgres')]
            }
        ]
    }
    with patch('pipelinewise.cli.pipelinewise.utils.silentremove') as silentremove:
        with patch('pipelinewise.cli.pipelinewise.FastSyncTapPostgres.drop_slot') as drop_slot:
            with patch('pipelinewise.cli.pipelinewise.Config.get_connector_config_file') as \
                    get_connector_config_file:
                with NamedTemporaryFile(suffix='.json') as fhandler:
                    fhandler.write(b'{"host": "localhost"}')
                    fhandler.seek(0)
                    get_connector_config_file.return_value = fhandler.name
                    deleted_taps_count = self.pipelinewise.cleanup_after_deleted_config(old_config)
    assert deleted_taps_count == 1
    assert silentremove.call_args_list == [ call(f'{CONFIG_DIR}/target_two/tap_four')]
    # called because the deleted tap is a tap-postgres
    drop_slot.assert_called_once()