nosetests smashing module content

September 18, 2008 – 12:24 pm

Work Time FunImage via Wikipedia Spent several hours yesterday untangling yet another mysterious test crash:

Warning: Field 'id' doesn't have a default value

As appears, it happened during usual INSERT to djangocontenttype… WTF!?

mysql> describe django_content_type;
+-----------+--------------+------+-----+---------+-------+
| Field     | Type         | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| id        | int(11)      | NO   | PRI | NULL    |       |
| name      | varchar(100) | NO   |     | NULL    |       |
| app_label | varchar(100) | NO   | MUL | NULL    |       |
| model     | varchar(100) | NO   |     | NULL    |       |
+-----------+--------------+------+-----+---------+-------+
4 rows in set (0.01 sec)

Where the #$^ AUTOINCREMENT is?

To make long story short, it appeared that for some strange reason django.db.connection.creation.data__types contains the values for sqlite that we use in previous tests and not mysql backend that is reported to be used.

And, yes, isolation plugin of nosetests doesn’t help.

Reblog this post [with Zemanta]
blog comments powered by Disqus
192.168.1.1Linksys Router SetupLinksys Default Password
192.168.1.1
192.168.1.1
MP4
192.168.1.1
192.168.1.1
Linksys Router
192 168 1 1
flush dns
MP4
MP4
Linksys Router Setup
spdif
192.168.1.1
192.168.1.1
Linksys Router
0x80070005 error