.read() should return an ImmutableMultiDict

This commit is contained in:
richard-dds
2018-11-19 11:38:22 -05:00
parent 29f9520dda
commit de12aee163
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import pytest
from werkzeug.datastructures import ImmutableDict
from werkzeug.datastructures import ImmutableMultiDict
from atst.utils.form_cache import DEFAULT_CACHE_NAME, FormCache
@@ -10,13 +10,13 @@ def form_cache(app):
def test_cache_form_data(app, form_cache):
data = ImmutableDict({"kessel_run": "12 parsecs"})
data = ImmutableMultiDict({"kessel_run": "12 parsecs"})
key = form_cache.write(data)
assert app.redis.get("{}:{}".format(DEFAULT_CACHE_NAME, key))
def test_retrieve_form_data(form_cache):
data = ImmutableDict({"class": "corellian"})
data = ImmutableMultiDict({"class": "corellian"})
key = form_cache.write(data)
retrieved = form_cache.read(key)
assert retrieved == data