Replace upsert=True with conflict='replace' in tests

Review 1804 by @gchpaco
Related to #2733