Fixed Test Case for Hyperlink

This commit is contained in:
Luis San Pablo 2015-12-04 05:42:46 +00:00
parent 8501f59216
commit 4092cef392

View File

@ -209,10 +209,10 @@ class TestManyRelatedField(APISimpleTestCase):
class TestHyperlink:
def setup(self):
self.default_hyperlink = Hyperlink('http://example.com', 'test')
self.default_hyperlink = serializers.Hyperlink('http://example.com', 'test')
def test_can_be_pickled(self):
import pickle
upkled = pickle.loads(pickle.dump(self.default_hyperlink))
assert upickled == self.default_hyperlink
assert upickled.name == self.default_hyperlink.name
upkled = pickle.loads(pickle.dumps(self.default_hyperlink))
assert upkled == self.default_hyperlink
assert upkled.name == self.default_hyperlink.name