Skip to content

Commit

Permalink
Lint tests too
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre committed Mar 4, 2017
1 parent b583847 commit bf0f0a0
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def tox(ctx):
@task
def qa(ctx):
'''Run a quality report'''
lrun('flake8 flask_fs')
lrun('flake8 flask_fs tests')


@task
Expand Down
6 changes: 3 additions & 3 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def test_custom_url(app):
def test_custom_f_url(app):
files = Storage('files')
app.configure(files,
FS_URL='http://somewhere.net/test/',
FILES_FS_URL='http://somewhere-else.net/test/'
)
FS_URL='http://somewhere.net/test/',
FILES_FS_URL='http://somewhere-else.net/test/'
)
assert files.base_url == 'http://somewhere-else.net/test/'
2 changes: 1 addition & 1 deletion tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_lowercase_ext():
assert files.lower_extension('AUDIO.M4A') == 'AUDIO.m4a'


def test_ALL():
def test_all():
assert 'txt' in files.ALL
assert 'exe' in files.ALL

Expand Down
2 changes: 1 addition & 1 deletion tests/test_gridfs_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_delete_with_versions(self, faker):
filename = 'test.txt'
self.put_file(filename, faker.sentence())
self.put_file(filename, faker.sentence())
assert self.gfs.find({'filename': filename}).count() == 2
assert self.gfs.find({'filename': filename}).count() == 2

self.backend.delete(filename)
assert not self.file_exists(filename)
6 changes: 3 additions & 3 deletions tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,9 @@ def test_url_from_config_with_scheme(app):
https = fs.Storage('https')

app.configure(http, https,
HTTP_FS_URL='http://somewhere.com/static',
HTTPS_FS_URL='https://somewhere.com/static'
)
HTTP_FS_URL='http://somewhere.com/static',
HTTPS_FS_URL='https://somewhere.com/static'
)

assert http.url('test.txt') == 'http://somewhere.com/static/test.txt'
assert https.url('test.txt') == 'https://somewhere.com/static/test.txt'
Expand Down
4 changes: 1 addition & 3 deletions tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import pytest

from flask import url_for

import flask_fs as fs
Expand All @@ -27,7 +25,7 @@ def test_get_file(app, mock_backend):
file_url = url_for('fs.get_file', fs='test', filename='test.txt')

response = app.test_client().get(file_url)
assert response.status_code == 200
assert response.status_code == 200
assert response.data == 'content'.encode('utf-8')


Expand Down

0 comments on commit bf0f0a0

Please sign in to comment.