Files
@ b4944cb05e94
Branch filter:
Location: rattail-project/rattail/tests/db/test_core.py - annotation
b4944cb05e94
690 B
text/x-python
Add hidden file to force presence of `docs/_static`.
c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 aaabe51804ca c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 aaabe51804ca c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 aaabe51804ca c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 c44ddd3740e8 |
from unittest import TestCase
from rattail.db import core
from sqlalchemy import Column
class TestCore(TestCase):
def test_uuid_column(self):
column = core.uuid_column()
self.assertTrue(isinstance(column, Column))
self.assertEqual(column.name, None)
self.assertTrue(column.primary_key)
self.assertFalse(column.nullable)
self.assertFalse(column.default is None)
def test_uuid_column_no_default(self):
column = core.uuid_column(default=None)
self.assertTrue(column.default is None)
def test_uuid_column_nullable(self):
column = core.uuid_column(nullable=True)
self.assertTrue(column.nullable)
|