swift/test/unit/common
Tim Burke 387ce13aa1 Use LogRecord.msg instead of LogRecord.message in tests
From the docs for LogRecord.message [1],

> This is set when Formatter.format() is invoked.

Apparently we may find ourselves in a situation [2] where that never
happens? Really weird that it failed *midway* through the test though;
maybe some concurrent test removed all formatters?

ERROR: test_known_bad_ec_config
(test.unit.common.test_storage_policy.TestStoragePolicies)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ".../mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File ".../test/unit/common/test_storage_policy.py", line 688, in test_known_bad_ec_config
    self.assertIn(msg, records[0].message)
AttributeError: 'LogRecord' object has no attribute 'message'

[1] https://docs.python.org/2/library/logging.html#logrecord-attributes
[2] http://logs.openstack.org/59/460359/1/check/gate-swift-tox-xfs-tmp-py27-ubuntu-xenial/5ecc2cb/console.html#_2017-04-27_01_06_43_346096
Change-Id: I8f5ac0ec1195a233f14edc0126de1d1cea7a6e2f
2017-04-28 15:56:25 -07:00
..
middleware Merge "Clean up unused function" 2017-03-22 11:14:48 +00:00
ring Make add_dev complain louder about missing keys 2017-04-25 19:29:57 -07:00
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
corrupted_example.db Real files for bad databases. 2011-08-02 18:21:25 +00:00
malformed_example.db Real files for bad databases. 2011-08-02 18:21:25 +00:00
malformed_schema_example.db Quarantine malformed database schema SQLite errors 2016-12-01 14:17:02 +11:00
test_base_storage_server.py pep8 fix: assertEquals -> assertEqual 2015-10-11 12:57:25 +02:00
test_bufferedhttp.py remove remaining simplejson uses, prefer standard library import 2015-11-16 12:34:24 -08:00
test_constraints.py add assert error information 2016-10-03 15:10:53 +00:00
test_container_sync_realms.py Fix unit tests failing in some cases 2014-10-09 22:04:53 +05:30
test_daemon.py Always set swift processes to use UTC 2016-12-19 16:23:13 -08:00
test_db_replicator.py Container drive error results double space usage on rest drives 2017-04-11 09:49:59 +02:00
test_db.py Replace 'assertTrue(a not in b)' with 'assertNotIn(a, b)' 2016-12-12 16:23:09 +07:00
test_direct_client.py Replace 'assertTrue(a not in b)' with 'assertNotIn(a, b)' 2016-12-12 16:23:09 +07:00
test_exceptions.py Remove swiftclient dep on direct_client 2013-12-24 03:11:43 -08:00
test_header_key_dict.py Py3: Fixes header key dict 2016-11-08 12:22:12 -08:00
test_internal_client.py Py3: Fixes eventlet ImportError: No module named urllib2 2016-09-07 09:04:30 +00:00
test_linkat.py Make object creation more atomic in Linux 2016-08-24 14:56:00 +05:30
test_manager.py Test that Manager.reload does stop/start in that order 2017-03-24 10:47:53 +00:00
test_memcached.py Tighten memcached tests 2016-07-07 15:34:44 -04:00
test_request_helpers.py Enable middleware to set metadata on object POST 2016-06-28 11:00:33 +01:00
test_splice.py py3: Port test_splice to Python 3 2016-09-05 12:20:53 -07:00
test_storage_policy.py Use LogRecord.msg instead of LogRecord.message in tests 2017-04-28 15:56:25 -07:00
test_swob.py Replace 'assertTrue(a not in b)' with 'assertNotIn(a, b)' 2016-12-12 16:23:09 +07:00
test_utils.py Improve test_get_valid_utf8_str coverage 2017-04-20 15:54:54 -07:00
test_wsgi.py refactor some common code from crypto 2017-03-09 11:12:29 -05:00