well one is Unicode and one is not. You see the u' in front of first ns.example...
How about: self.assertNotEqual(unicode(self.zone.name_server), unicode(soa[4])) I'd even say that you can try without unicode() wrap. ---------------------------------- WARNING !!! This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review; use, disclosure or distribution is prohibited, and could result in criminal prosecution. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. This message is private and is considered a confidential exchange - public disclosure of this electronic message or its contents are prohibited. On Wed, Feb 12, 2014 at 7:56 PM, Marc Aymerich <glicer...@gmail.com> wrote: > I'm running my Django app tests and I'm getting a random and very > annoying assertion error > > ====================================================================== > FAIL: test_rest_dns_delete > > (orchestra.apps.dns.zones.tests.functional_tests.tests.RESTBind9MasterBackendTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/home/orchestra/django-orchestra/orchestra/apps/dns/zones/tests/functional_tests/tests.py", > line 212, in test_rest_dns_delete > self.validate_delete() > File > "/home/orchestra/django-orchestra/orchestra/apps/dns/zones/tests/functional_tests/tests.py", > line 86, in validate_delete > self.assertNotEqual('%s.' % self.zone.name_server, soa[4]) > AssertionError: u'ns.example.com.' == 'ns.example.com.' > > ---------------------------------------------------------------------- > > WTF is wrong with it? > The thing is that I don't always get the error, just like 1/4 of the > times, and a manual assertion like this never fails ! > > self.assertEqual(u'ns.example.com.', 'ns.example.com.') > > > Any clue? > > Thank you guys! > > > -- > Marc > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CA%2BDCN_upBZoac0_UUWN2ivdga%2BwWkmwwkwZHx12UBhVb5qpS-A%40mail.gmail.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1DFf213k0NqwgpOT4GjzB2GSPy9qZnyk2zqu%3Dem_U_NtcjTg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.