The problem was, that I assigned default settings this way:
DEFAULT_SETTINGS = {...}
...
self.settings = DEFAULT_SETTINGS
I changed it to:
self.settings = DEFAULT_SETTINGS.copy()
And it is ok now :)
Martin
On Wed, 16 Mar 2011 00:49:15 +0100, Karen Tracey <kmtra...@gmail.com>
wrote:
On Tue, Mar 15, 2011 at 6:40 PM, Martin Tiršel <dja...@blackpage.eu>
wrote:
I am new to unit tests and I am using django.test.TestCase. What I don't
understand, is this situation
class GameWorldTests(TestCase):
def setUp(self):
self.test_world = GameWorld.objects.create(
name='Testing world',
game=GameWorld.GAME_TYPE_XY,
domain='test.xy.com'
)
print self.test_world.settings['world_width']
What is that settings attribute and how is it attached to a GameWorld
instance?
(Yes, the DB is reset and setUp is called between each test function
run.)
Karen
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.