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: class TestHyperlink:
def setup(self): 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): def test_can_be_pickled(self):
import pickle import pickle
upkled = pickle.loads(pickle.dump(self.default_hyperlink)) upkled = pickle.loads(pickle.dumps(self.default_hyperlink))
assert upickled == self.default_hyperlink assert upkled == self.default_hyperlink
assert upickled.name == self.default_hyperlink.name assert upkled.name == self.default_hyperlink.name