models: Decouple fields tests from the model metaclass

This commit is contained in:
Thomas Adamcik 2015-05-04 21:37:17 +02:00
parent bb95dc3b9b
commit 07159f69c2

View File

@ -3,15 +3,14 @@ from __future__ import absolute_import, unicode_literals
import unittest
from mopidy.models.fields import * # noqa: F403
from mopidy.models.immutable import ImmutableObjectMeta
def create_instance(field):
"""Create an instance of a dummy class for testing fields."""
class Dummy(object):
__metaclass__ = ImmutableObjectMeta
attr = field
attr._name = 'attr'
return Dummy()