mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +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:
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user