diff options
author | Emma Foley <emma.l.foley@intel.com> | 2017-11-29 23:35:05 +0000 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2018-01-12 14:39:00 +0000 |
commit | b3cc28d84b949907a89d76c54ece73ed1a69f353 (patch) | |
tree | 312bdb411d6b34ab55d6138e5f65aea8ffa9cf6f /tests/unit/dispatcher/test_influxdb_line_protocol.py | |
parent | d579e62b431a31856a03098dc5323948ccfa4fdb (diff) |
Move tests: unit/dispatcher
* Fix pylint errors
* Add TODOs
Some errors are ignored locally, as they were a symptom of other problems.
These issues have been flagged with a TODO, and should be fixed later.
JIRA: YARDSTICK-837
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
Change-Id: I1f8a6041424c4c69f46ef30bd5c66d2d51d24347
Diffstat (limited to 'tests/unit/dispatcher/test_influxdb_line_protocol.py')
-rw-r--r-- | tests/unit/dispatcher/test_influxdb_line_protocol.py | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/unit/dispatcher/test_influxdb_line_protocol.py b/tests/unit/dispatcher/test_influxdb_line_protocol.py deleted file mode 100644 index 51dc39e3c..000000000 --- a/tests/unit/dispatcher/test_influxdb_line_protocol.py +++ /dev/null @@ -1,64 +0,0 @@ -############################################################################## -# Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -# Unittest for yardstick.dispatcher.influxdb_line_protocol - -# yardstick comment: this file is a modified copy of -# influxdb-python/influxdb/tests/test_line_protocol.py - -from __future__ import absolute_import -import unittest -from third_party.influxdb.influxdb_line_protocol import make_lines - - -class TestLineProtocol(unittest.TestCase): - - def test_make_lines(self): - data = { - "tags": { - "empty_tag": "", - "none_tag": None, - "integer_tag": 2, - "string_tag": "hello" - }, - "points": [ - { - "measurement": "test", - "fields": { - "string_val": "hello!", - "int_val": 1, - "float_val": 1.1, - "none_field": None, - "bool_val": True, - } - } - ] - } - - self.assertEqual( - make_lines(data), - 'test,integer_tag=2,string_tag=hello ' - 'bool_val=True,float_val=1.1,int_val=1i,string_val="hello!"\n' - ) - - def test_string_val_newline(self): - data = { - "points": [ - { - "measurement": "m1", - "fields": { - "multi_line": "line1\nline1\nline3" - } - } - ] - } - - self.assertEqual( - make_lines(data), - 'm1 multi_line="line1\\nline1\\nline3"\n' - ) |