Skip to content

Commit

Permalink
Merge pull request certbot#929 from kuba/bugs/928
Browse files Browse the repository at this point in the history
Fix certbot#928 test_json_dumps_pretty py3 compat.
  • Loading branch information
bmw committed Oct 9, 2015
2 parents 9e1477f + 6dfb75b commit 013d5d2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions acme/acme/jose/interfaces_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Tests for acme.jose.interfaces."""
import unittest

import six


class JSONDeSerializableTest(unittest.TestCase):
# pylint: disable=too-many-instance-attributes
Expand Down Expand Up @@ -90,8 +92,9 @@ def test_json_dumps(self):
self.assertEqual('["foo1", "foo2"]', self.seq.json_dumps())

def test_json_dumps_pretty(self):
self.assertEqual(
self.seq.json_dumps_pretty(), '[\n "foo1", \n "foo2"\n]')
filler = ' ' if six.PY2 else ''
self.assertEqual(self.seq.json_dumps_pretty(),
'[\n "foo1",{0}\n "foo2"\n]'.format(filler))

def test_json_dump_default(self):
from acme.jose.interfaces import JSONDeSerializable
Expand Down

0 comments on commit 013d5d2

Please sign in to comment.