autowisp.tests.test_timestamp_triggers module

Class Inheritance Diagram

Inheritance diagram of DataModelBase, TestTriggerQuoting

Tests for the DDL that installs the update-timestamp triggers.

Its own module rather than part of test_database_migration: the migration code reinstates these triggers, but what they say is decided in autowisp.database.data_model, and that is what is checked here.

class autowisp.tests.test_timestamp_triggers.TestTriggerQuoting(methodName='runTest')[source]

Bases: TestCase

Inheritance diagram of autowisp.tests.test_timestamp_triggers.TestTriggerQuoting

Every identifier a trigger names is quoted.

condition is a table here and a reserved word in MariaDB, so an unquoted ON condition is a syntax error. Over the metadata rather than over that one name, and on both dialects, since the next reserved word to become a table would be as silent as this one was on SQLite – which reserves a different set and forgave it.

tables()[source]

Return the tables the timestamp triggers are installed on.

test_mysql_quotes_what_it_names()[source]

The table and the column written; it names no key columns.

test_sqlite_quotes_what_it_names()[source]

Including the key columns the row is addressed by.