google-code-export / django-treemenus

Automatically exported from code.google.com/p/django-treemenus
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

[patch] some tests fails #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. python manage.py test treemenus

What is the expected output?
...........
----------------------------------------------------------------------
Ran 11 tests in 2.004s

OK

What do you see instead?

.....F....F
======================================================================
FAIL: test_move_item_or_clean_ranks (treemenus.tests.TreemenusTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/django/projects/cjcdn_com/apps/treemenus/tests.py", line 572,
in test_move_item_or_clean_ranks
    self.assertEquals(menu_item1.rank, 0)
AssertionError: 3 != 0

======================================================================
FAIL: test_view_history_item (treemenus.tests.TreemenusTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/django/projects/cjcdn_com/apps/treemenus/tests.py", line 78,
in test_view_history_item
    self.assertTrue('Change history' in response.content)
AssertionError

----------------------------------------------------------------------
Ran 11 tests in 1.924s

FAILED (failures=2)

What version of the product are you using?
Django trunk (r11079) with russian language set.

Original issue reported on code.google.com by ivan.fed...@gmail.com on 20 Jun 2009 at 11:10

Attachments:

GoogleCodeExporter commented 9 years ago
Some comments:
test_view_history_item fails on any localized installation of Django, so I'm 
modify
TestCase for set English localisation. (Code copy-pasted from 
django.contrib.auth).

test_move_item_or_clean_ranks fails because without implicit ordering 
declaration,
DBMS doesn't guarantee any fixed ordering.

Original comment by ivan.fed...@gmail.com on 20 Jun 2009 at 11:14

GoogleCodeExporter commented 9 years ago
Thank you for the report and patch. I don't have the time to check it out in 
detail
now because I'm too busy, but I'll give it proper attention later.

Thanks,

Julien

Original comment by jpha...@gmail.com on 21 Jun 2009 at 7:38

GoogleCodeExporter commented 9 years ago
I cannot reproduce this bug. I tried with:

LANGUAGES = (('ru', 'Russian'),)
LANGUAGE_CODE = 'ru'
USE_I18N = True

... but all tests still pass.

Could you please provide me with the conditions that reproduce this problem?

Original comment by jpha...@gmail.com on 6 Dec 2009 at 5:17

GoogleCodeExporter commented 9 years ago
I've noticed that test_move_item_or_clean_ranks also fails for me when using
PostgreSQL (but works when I'm using SQLite).

Original comment by richardb...@gmail.com on 14 Dec 2009 at 12:01

GoogleCodeExporter commented 9 years ago
I don't have the time to check it. This bug reproduceable only in few big
configurations, so it's hard to find it.

AFAIR my patch is "copy-paste" from django.auth tests, so I'm think it's work 
right. :)

Original comment by ivan.fed...@gmail.com on 14 Dec 2009 at 9:53

GoogleCodeExporter commented 9 years ago
I'm afraid I can't reproduce this issue. Please reopen if you have more details 
to provide. Thanks!

Original comment by jpha...@gmail.com on 9 Oct 2010 at 1:52