Skip to content

Commit

Permalink
test: Codestyle.
Browse files Browse the repository at this point in the history
  • Loading branch information
shakefu committed Apr 6, 2018
1 parent e64c32f commit 0081d9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 0 additions & 2 deletions test/test_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,3 @@ def test_stop(exit):
def test_console_script(start):
TestCommand().console_script()
start.assert_called_with(sys.argv[1:])


11 changes: 4 additions & 7 deletions test/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
bson = None

import pytool
from .util import *
from .util import eq_, raises


def test_as_json_datetime():
n = datetime.now()
eq_(pytool.json.as_json(n),
'"{}"'.format(n.strftime('%a %b %d %Y %H:%M:%S %z').strip()))
'"{}"'.format(n.strftime('%a %b %d %Y %H:%M:%S %z').strip()))


def test_as_json_datetime_with_tz():
n = pytool.time.utcnow()
eq_(pytool.json.as_json(n),
'"{}"'.format(n.strftime('%a %b %d %Y %H:%M:%S %z').strip()))
'"{}"'.format(n.strftime('%a %b %d %Y %H:%M:%S %z').strip()))


def test_as_json_ObjectId():
Expand All @@ -32,7 +32,7 @@ def test_as_json_ObjectId():

@raises(TypeError)
def test_as_json_bad():
d = {'test': 1, 'two':type()}
d = {'test': 1, 'two': type()}
pytool.json.as_json(d)


Expand Down Expand Up @@ -107,6 +107,3 @@ def for_json(self):

obj = {'list': [Test()]}
eq_(pytool.json.as_json(obj), '{"list": [{"for_json": 1}]}')



0 comments on commit 0081d9d

Please sign in to comment.