File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1000,6 +1000,19 @@ def test_table_constraints_property_setter_only_foriegn_keys(self):
10001000 ]
10011001 }
10021002
1003+ def test_table_constraints_property_setter_no_constraints (self ):
1004+ from google .cloud .bigquery .table import TableConstraints
1005+
1006+ dataset = DatasetReference (self .PROJECT , self .DS_ID )
1007+ table_ref = dataset .table (self .TABLE_NAME )
1008+ table = self ._make_one (table_ref )
1009+
1010+
1011+ table_constraints = TableConstraints (primary_key = None , foreign_keys = None )
1012+ table .table_constraints = table_constraints
1013+
1014+ assert table ._properties ["tableConstraints" ] == {}
1015+
10031016 def test_description_setter_bad_value (self ):
10041017 dataset = DatasetReference (self .PROJECT , self .DS_ID )
10051018 table_ref = dataset .table (self .TABLE_NAME )
You can’t perform that action at this time.
0 commit comments