| 50 | |
| 51 | class SQLiteCheckTest(unittest.TestCase): |
| 52 | |
| 53 | def test_regression_14016(self): |
| 54 | """ |
| 55 | Test the date compare values in sqllite - see #14016. |
| 56 | |
| 57 | __: http://http://code.djangoproject.com/ticket/14016 |
| 58 | |
| 59 | """ |
| 60 | reporter = models.Reporter.objects.create(first_name='Django', |
| 61 | last_name='Spring') |
| 62 | article = models.Article.objects.create( |
| 63 | reporter=reporter, |
| 64 | pub_date=datetime.date.today()) |
| 65 | |
| 66 | |
| 67 | self.assertEquals(len(models.Article.objects.all()), 1) |
| 68 | articles = models.Article.objects.filter( |
| 69 | pub_date__gte = datetime.date.today()) |
| 70 | self.assertEquals(len(articles), 1) |
| 71 | articles = models.Article.objects.filter( |
| 72 | pub_date__lte = datetime.date.today()) |
| 73 | self.assertEquals(len(articles), 1) |
| 74 | |