mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 05:20:12 +03:00
Move MockRequest to helpers
This commit is contained in:
parent
8744849564
commit
03ca67da6f
|
@ -1,3 +1,8 @@
|
|||
class MockRequest:
|
||||
def build_absolute_uri(self, value):
|
||||
return 'http://example.com' + value
|
||||
|
||||
|
||||
class MockFile:
|
||||
def __init__(self, name='', size=0, url=''):
|
||||
self.name = name
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
from rest_framework import serializers
|
||||
|
||||
from ..base import FieldValues
|
||||
from .helpers import MockFile
|
||||
|
||||
|
||||
class MockRequest:
|
||||
def build_absolute_uri(self, value):
|
||||
return 'http://example.com' + value
|
||||
from .helpers import MockFile, MockRequest
|
||||
|
||||
|
||||
class TestFileField(FieldValues):
|
||||
|
|
Loading…
Reference in New Issue
Block a user