Move MockRequest to helpers

This commit is contained in:
b.khasanov 2016-10-30 16:01:16 +03:00
parent 8744849564
commit 03ca67da6f
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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):