8000 Merge branch 'typos' of github.com:lra/influxdb-python · bbinet/influxdb-python@dc23886 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc23886

Browse files
committed
Merge branch 'typos' of github.com:lra/influxdb-python
2 parents 0345115 + af668bd commit dc23886

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

examples/tutorial.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@ def main(host=None, port=None):
1010
dbuser = 'smly'
1111
dbuser_password = 'my_secret_password'
1212
query = 'select column_one from foo;'
13-
json_body = [
14-
{
15-
"points": [
16-
["1", 1, 1.0],
17-
["2", 2, 2.0]
18-
],
19-
"name": "foo",
20-
"columns": ["column_one", "column_two", "column_three"]
21-
}
22-
]
23-
13+
json_body = [{
14+
"points": [
15+
["1", 1, 1.0],
16+
["2", 2, 2.0]
17+
],
18+
"name": "foo",
19+
"columns": ["column_one", "column_two", "column_three"]
20+
}]
2421

2522
client = InfluxDBClient(host, port, user, password, dbname)
2623

@@ -42,7 +39,7 @@ def main(host=None, port=None):
4239
dbusers = client.get_database_users()
4340
print("Get list of database users again: {0}".format(dbusers))
4441

45-
print("Swtich user: " + dbuser)
42+
print("Switch user: " + dbuser)
4643
client.switch_user(dbuser, dbuser_password)
4744

4845
print("Write points: {0}".format(json_body))
@@ -53,7 +50,7 @@ def main(host=None, port=None):
5350

5451
print("Result: {0}".format(result))
5552

56-
print("Swtich user: " + user)
53+
print("Switch user: " + user)
5754
client.switch_user(user, password)
5855

5956
print("Delete database: " + dbname)

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717

1818

1919
with open(os.path.join(os.path.dirname(__file__),
20-
'influxdb', '__init__.py')) as f:
21-
version = re.search("__version__ = '([^']+)'", f.read()).group(1)
20+
'influxdb',
21+
'__init__.py')) as f:
22+
version = re.search("__version__ = '([^']+)'", f.read()).group(1)
2223

2324
with open('requirements.txt', 'r') as f:
2425
requires = [x.strip() for x in f if x.strip()]

tests/influxdb/client_test.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
"""
33
unit tests
44
"""
5-
import json
6-
75
import requests
86
from nose.tools import raises
97
from mock import patch
@@ -100,7 +98,10 @@ def test_remove_scheduled_delete(self):
10098
cli.remove_scheduled_delete(1)
10199

102100
def test_query(self):
103-
expected = """[{"name":"foo","columns":["time","sequence_number","column_one"],"points":[[1383876043,16,"2"],[1383876043,15,"1"],[1383876035,14,"2"],[1383876035,13,"1"]]}]"""
101+
expected = ('[{"name":"foo",'
102+
'"columns":["time","sequence_number","column_one"],'
103+
'"points":[[1383876043,16,"2"],[1383876043,15,"1"],'
104+
'[1383876035,14,"2"],[1383876035,13,"1"]]}]')
104105
with patch.object(session, 'get') as mocked_get:
105106
mocked_get.return_value = _build_response_object(
106107
status_code=200,

0 commit comments

Comments
 (0)
0