Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Jul 3, 2014
1 parent 3ae666d commit bb23f68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 3 additions & 1 deletion urlarchivefield/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def __init__(self, *args, **kwargs):

def deconstruct(self):
try:
name, path, args, kwargs = super(URLArchiveField, self).deconstruct()
name, path, args, kwargs = super(
URLArchiveField, self
).deconstruct()
except AttributeError:
raise NotImplementedError
if self.compress is not True:
Expand Down
9 changes: 4 additions & 5 deletions urlarchivefield/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ def test_compress(self):

def test_deconstruct(self):
try:
name, path, args, kwargs = URLArchiveField(
compress=False
).deconstruct()
field1 = URLArchiveField(compress=False)
name, path, args, kwargs = field1.deconstruct()
except NotImplementedError:
return
new_obj = URLArchiveField(*args, **kwargs)
self.assertEqual(obj.archive2, new_obj.archive2)
field2 = URLArchiveField(*args, **kwargs)
self.assertEqual(field1.archive2, field2.archive2)

0 comments on commit bb23f68

Please sign in to comment.