File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -138,9 +138,23 @@ def test_multiple(self):
138138 self .assertTrue ("column_b" in column_names )
139139
140140
141+ @postgres_only
141142class TestNull (DBTestCase ):
142143 def test_null (self ):
143- pass
144+ query = """
145+ SELECT is_nullable FROM information_schema.columns
146+ WHERE table_name = 'band'
147+ AND table_catalog = 'piccolo'
148+ AND column_name = 'popularity'
149+ """
150+
151+ Band .alter ().set_null (Band .popularity , boolean = True ).run_sync ()
152+ response = Band .raw (query ).run_sync ()
153+ self .assertTrue (response [0 ]["is_nullable" ] == "YES" )
154+
155+ Band .alter ().set_null (Band .popularity , boolean = False ).run_sync ()
156+ response = Band .raw (query ).run_sync ()
157+ self .assertTrue (response [0 ]["is_nullable" ] == "NO" )
144158
145159
146160@postgres_only
You can’t perform that action at this time.
0 commit comments