~free.ekanayaka/storm/any-expr

« back to all changes in this revision

Viewing changes to tests/databases/mysql.py

  • Committer: James Henstridge
  • Date: 2010-02-08 11:36:58 UTC
  • mfrom: (340.1.2 storm.bug-394428)
  • Revision ID: james@jamesh.id.au-20100208113658-0a89ya5sam1gb5s1
Disallow setting a ReferenceSet attribute.

Previously setting a ReferenceSet attribute succeeded, but did not 
update the reference set, which could hide bugs.
[r=jkakar,therve] [f=394428]

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
        result = self.connection.execute("SELECT MAX(id) FROM test")
107
107
        self.assertEqual(result.get_one()[0], id_variable.get())
108
108
 
 
109
    def test_mysql_specific_reserved_words(self):
 
110
        reserved_words = """
 
111
            accessible analyze asensitive before bigint binary blob call
 
112
            change condition current_user database databases day_hour
 
113
            day_microsecond day_minute day_second delayed deterministic
 
114
            distinctrow div dual each elseif enclosed escaped exit explain
 
115
            float4 float8 force fulltext high_priority hour_microsecond
 
116
            hour_minute hour_second if ignore index infile inout int1 int2
 
117
            int3 int4 int8 iterate keys kill leave limit linear lines load
 
118
            localtime localtimestamp lock long longblob longtext loop
 
119
            low_priority master_ssl_verify_server_cert mediumblob mediumint
 
120
            mediumtext middleint minute_microsecond minute_second mod modifies
 
121
            no_write_to_binlog optimize optionally out outfile purge range
 
122
            read_write reads regexp release rename repeat replace require
 
123
            return rlike schemas second_microsecond sensitive separator show
 
124
            spatial specific sql_big_result sql_calc_found_rows
 
125
            sql_small_result sqlexception sqlwarning ssl starting
 
126
            straight_join terminated tinyblob tinyint tinytext trigger undo
 
127
            unlock unsigned use utc_date utc_time utc_timestamp varbinary
 
128
            varcharacter while xor year_month zerofill
 
129
            """.split()
 
130
        for word in reserved_words:
 
131
            self.assertTrue(self.connection.compile.is_reserved_word(word),
 
132
                            "Word missing: %s" % (word,))
 
133
 
109
134
 
110
135
class MySQLUnsupportedTest(UnsupportedDatabaseTest, TestHelper):
111
 
    
 
136
 
112
137
    dbapi_module_names = ["MySQLdb"]
113
138
    db_module_name = "mysql"
114
139