
Running unit tests fails with the error: monasca_api.tests.test_a_repository.TestAlarmRepoDB.test_should_count ...FAILED 'Textual column expression 'metric_name' should be explicitly declared with text('metric_name'), or use column('metric_name') for more specificity' Using strings as SQL fragments was deprecated in v1.0: (https://docs.sqlalchemy.org/en/13/changelog/migration_10.html#warnings-emitted-when-coercing-full-sql-fragments-into-text) Deprecation warnings now throw exceptions as of v1.3: (https://docs.sqlalchemy.org/en/13/changelog/migration_13.html#deprecation-warnings-are-emitted-for-all-deprecated-elements-new-deprecations-added) This patch modifies the sql query to make use of column constructor. Change-Id: Ic258a3f453e95844249eaa763aa507d6be0d132e