Skip to content

Commit 2380c72

Browse files
committed
Fix style and remove unused variable
1 parent 4fb5f48 commit 2380c72

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ before_install:
1414
- docker cp tests/static/keyfile arango:/tmp/keyfile
1515
- docker start arango
1616
install:
17-
- pip install flake8 mock
18-
- pip install pytest pytest-cov coveralls
17+
- pip install pytest==4.6.11
18+
- pip install pytest-cov==2.10.0
19+
- pip install coveralls==2.0.0
20+
- pip install mock
21+
- pip install flake8
1922
- pip install sphinx sphinx_rtd_theme
2023
- pip install .
2124
script:

arango/formatter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,8 @@ def format_view(body): # pragma: no cover
812812
result['writebuffer_max_size'] = body['writebufferSizeMax']
813813
if 'links' in body:
814814
result['links'] = {
815-
name: format_view_link(link) for name, link in body['links'].items()
815+
name: format_view_link(link)
816+
for name, link in body['links'].items()
816817
}
817818

818819
return verify_format(body, result)

tests/test_view.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,28 @@
99
ViewReplaceError,
1010
ViewUpdateError
1111
)
12-
from tests.helpers import assert_raises, generate_view_name, generate_col_name
12+
from tests.helpers import assert_raises, generate_view_name
1313

1414

15-
def test_view_management(db, bad_db, cluster):
15+
def test_view_management(db, bad_db, col, cluster):
1616
# Test create view
1717
view_name = generate_view_name()
1818
bad_view_name = generate_view_name()
1919
view_type = 'arangosearch'
2020

21-
col_name = generate_col_name()
22-
col = db.create_collection(
23-
name=col_name
24-
)
25-
2621
result = db.create_view(
2722
view_name,
2823
view_type,
29-
{'consolidationIntervalMsec': 50000, "links": {col_name: {}}}
24+
{
25+
'consolidationIntervalMsec': 50000,
26+
'links': {col.name: {}}
27+
}
3028
)
3129
assert 'id' in result
3230
assert result['name'] == view_name
3331
assert result['type'] == view_type
3432
assert result['consolidation_interval_msec'] == 50000
35-
assert col_name in result["links"]
33+
assert col.name in result["links"]
3634

3735
view_id = result['id']
3836

0 commit comments

Comments
 (0)