core/tests
Andrew Rowson 770eeaf82f Encode prometheus metric names per the prom spec (#26639)
Referencing issue #26418.

Prometheus metric names can only contain chars a-zA-Z0-9, : and _
(https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).

HA currently generates invalid prometheus names, e.g. if the unit for a
sensor is a non-ASCII character containing  ° or μ. To resolve, we need
to sanitize the name before creating, replacing non-valid characters
with a valid representation. In this case, I've used
"u{unicode-hex-code}".

Also updated the test case to make sure that the ° case is handled.
2019-09-19 12:51:49 +02:00
..
auth Black 2019-07-31 12:25:30 -07:00
components Encode prometheus metric names per the prom spec (#26639) 2019-09-19 12:51:49 +02:00
fixtures Fixes invalid JSON files and whitespace corrections in YAML files (#26396) 2019-09-03 16:02:42 -07:00
helpers Fix tests 2019-09-10 13:07:55 -07:00
mock Black 2019-07-31 12:25:30 -07:00
resources Revised package util tests 2016-01-30 14:08:32 -05:00
scripts Integration requirement check refactor (#25626) 2019-08-07 15:35:50 -07:00
test_util Black 2019-07-31 12:25:30 -07:00
testing_config Rename MockToggleDevice to MockToggleEntity (#26644) 2019-09-15 09:50:17 +02:00
util Black 2019-07-31 12:25:30 -07:00
__init__.py async HTTP component (#3914) 2016-10-23 23:48:01 -07:00
common.py Rename MockToggleDevice to MockToggleEntity (#26644) 2019-09-15 09:50:17 +02:00
conftest.py Black 2019-07-31 12:25:30 -07:00
test_bootstrap.py Black 2019-07-31 12:25:30 -07:00
test_config.py Allow components with empty list config (i.e. person) in packages (#25827) 2019-08-10 16:30:33 -07:00
test_config_entries.py Reload config entry when entity enabled in entity registry, remove entity if disabled. (#26120) 2019-08-22 19:32:43 -05:00
test_core.py Black 2019-07-31 12:25:30 -07:00
test_data_entry_flow.py Black 2019-07-31 12:25:30 -07:00
test_loader.py Black 2019-07-31 12:25:30 -07:00
test_main.py Black 2019-07-31 12:25:30 -07:00
test_requirements.py Integration requirement check refactor (#25626) 2019-08-07 15:35:50 -07:00
test_setup.py Black 2019-07-31 12:25:30 -07:00