Sfoglia il codice sorgente

Use media/ for files created during tests. Fixes #2

tags/v1.0.0
Krzysztof Klimonda 11 anni fa
parent
commit
4580a700ab
1 ha cambiato i file con 0 aggiunte e 10 eliminazioni
  1. +0
    -10
      pinry/core/tests/api.py

+ 0
- 10
pinry/core/tests/api.py Vedi File

@@ -1,7 +1,5 @@
import mock

from django.conf import settings

from django_images.models import Thumbnail
from taggit.models import Tag
from tastypie.test import ResourceTestCase
@@ -24,13 +22,6 @@ def mock_urlopen(url):
return open('logo.png')


def mock_storage_path(self, name):
if name == 'logo.png':
return settings.SITE_ROOT + 'logo.png'
return name


@mock.patch('django.core.files.storage.FileSystemStorage.path', mock_storage_path)
class ImageResourceTest(ResourceTestCase):
def test_post_create_unsupported(self):
"""Make sure that new images can't be created using API"""
@@ -65,7 +56,6 @@ class ImageResourceTest(ResourceTestCase):
})


@mock.patch('django.core.files.storage.FileSystemStorage.path', mock_storage_path)
class PinResourceTest(ResourceTestCase):
def setUp(self):
super(PinResourceTest, self).setUp()


Caricamento…
Annulla
Salva