Before creating the temporary table, lower the "client_min_messages" setting because if the table that is being DROPped doesn't exist, PostgreSQL sends a NOTICE which in turn breaks the "no warnings" unit test