mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 13:04:03 +03:00
Fixed Test Case for Hyperlink
This commit is contained in:
parent
8501f59216
commit
4092cef392
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user