human
Complete this python program:
def assert_inserted(test_case, host, port):
assistant
#Here is the Python program you requested.

    """Verify some data has been inserted into the database.
    :param TestCase test_case: A test.
    :param host: Host to connect to.
    :param port: Port to connect to.
    :return: ``Deferred`` that fires when we verify data has been inserted.
    """
    d = get_postgres_connection(host, port, u'flockertest')
    def assert_data(connection):
        cursor = connection.cursor()
        cursor.execute('SELECT    *    FROM    testtable;')
        fetched_data = cursor.fetchone()[0]
        test_case.assertEqual(fetched_data, 123)
    d.addCallback(assert_data)
    return d