aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_metadata.py
diff options
context:
space:
mode:
authortilly-Q <nattilypigeonfowl@gmail.com>2014-05-14 12:16:03 -0400
committertilly-Q <nattilypigeonfowl@gmail.com>2014-05-14 12:16:03 -0400
commit414c682fb4a5b684cf259743a77e6e569395c16d (patch)
tree76e461831e049320870310299027a4ca8c48a018 /mediagoblin/tests/test_metadata.py
parent1688abbfc4c429af075ff95f2bb5d15266077c77 (diff)
downloadmediagoblin-414c682fb4a5b684cf259743a77e6e569395c16d.tar.lz
mediagoblin-414c682fb4a5b684cf259743a77e6e569395c16d.tar.xz
mediagoblin-414c682fb4a5b684cf259743a77e6e569395c16d.zip
Added some tests for metadata.
Diffstat (limited to 'mediagoblin/tests/test_metadata.py')
-rw-r--r--mediagoblin/tests/test_metadata.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/mediagoblin/tests/test_metadata.py b/mediagoblin/tests/test_metadata.py
index 71346bb4..b4ea646e 100644
--- a/mediagoblin/tests/test_metadata.py
+++ b/mediagoblin/tests/test_metadata.py
@@ -15,40 +15,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import pytest
-from mediagoblin.tools import template
from mediagoblin.tools.metadata import compact_and_validate
-from webtest import AppError
from jsonschema import ValidationError
-from .resources import GOOD_JPG
-
class TestMetadataFunctionality:
@pytest.fixture(autouse=True)
def _setup(self, test_app):
self.test_app = test_app
- def login(self, username):
- self.test_app.post(
- '/auth/login/', {
- 'username': username,
- 'password': 'toast'})
-
- def logout(self):
- self.test_app.get('/auth/logout/')
-
- def do_post(self, data, *context_keys, **kwargs):
- url = kwargs.pop('url', '/submit/')
- do_follow = kwargs.pop('do_follow', False)
- template.clear_test_template_context()
- response = self.test_app.post(url, data, **kwargs)
- if do_follow:
- response.follow()
- context_data = template.TEMPLATE_TEST_CONTEXT
- for key in context_keys:
- context_data = context_data[key]
- return response, context_data
-
def testCompactAndValidate(self):
# First, test out a well formatted piece of metadata
######################################################