I\'m trying to insert the value of the variable test_text into a Postgres 9.6 database, each time the database_insert function is triggered.
I\'m using Python 3.6 an
There's a subtle issue here.
You need a comma to make a tuple not just the parens/brackets.
So simply change to:
cur.execute("INSERT INTO test VALUES(%s);", (test_text,))
And you should be good!