def assert_inserted(test_case, host, port):
 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

def assert_inserted ( test_case , host , port ) : 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
verify some data has been inserted into the database .