Changes between Initial Version and Version 1 of Ticket #15081


Ignore:
Timestamp:
Jan 14, 2011, 6:44:49 AM (14 years ago)
Author:
Russell Keith-Magee
Comment:

I can't reproduce this. The test described passes as expected for me under SQLite and Postgres.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15081

    • Property Resolutionworksforme
    • Property Status newclosed
  • Ticket #15081 – Description

    initial v1  
    11Consider following case:
     2
    23#model
     4{{{
    35class sqltest(models.Model):
    46   
    57    name = models.CharField(max_length=100, unique=True)
     8}}}
    69
    710#test
    8 
     11{{{
    912from django.test import TestCase
    1013from testapp.app_test.models import sqltest
     
    1417        s = sqltest.objects.get(name='test1')
    1518        self.assertTrue(s)
    16 
     19}}}
    1720
    1821#in <app>/sql/sqltest.py
     22{{{
    1923insert into app_test_sqltest (name) values ('test1');
    2024insert into app_test_sqltest (name) values ('test2');
    2125insert into app_test_sqltest (name) values ('test3');
    22 
     26}}}
    2327
    2428When running your tests will not find the test1 entry. This is not consistent with how django docs explain it (although not that much testing information on custom sql).
Back to Top