Skip to content

Commit

Permalink
Make EmailTestModel globally available in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
twidi committed Jan 26, 2018
1 parent c06a2ba commit 9b059b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 2 additions & 8 deletions tests/fields/hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@

from limpyd import fields
from limpyd.exceptions import ImplementationError

from ..model import TestRedisModel, BaseModelTest


class EmailTestModel(TestRedisModel):
headers = fields.HashField(indexable=True)
raw_headers = fields.HashField()
from ..model import TestRedisModel, BaseModelTest, Email


class HashFieldTest(BaseModelTest):

model = EmailTestModel
model = Email

def test_hashfield_can_be_set_at_init(self):
headers = {
Expand Down
6 changes: 5 additions & 1 deletion tests/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import time
import unittest

from limpyd import model
from limpyd import model, fields
from limpyd import fields
from limpyd.exceptions import *

Expand Down Expand Up @@ -46,6 +46,10 @@ class Boat(TestRedisModel):
length = fields.StringField()


class Email(TestRedisModel):
headers = fields.HashField(indexable=True)


class BaseModelTest(LimpydBaseTest):

model = None
Expand Down

0 comments on commit 9b059b4

Please sign in to comment.