def METHOD_NAME(self):
    with Cursor(user='weewx1', passwd='weewx1') as cursor:
        cursor.execute("CREATE DATABASE test_weewx1")
        cursor.execute("CREATE TABLE test_weewx1.bar (col1 int, col2 int)")
        with self.assertRaises(OperationalError) as e:
            cursor.execute("CREATE TABLE test_weewx1.bar (col1 int, col2 int)")
        self.assertEqual(get_error(e), 1050)