File tree 1 file changed +13
-0
lines changed
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):
1000
1000
]
1001
1001
}
1002
1002
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
+
1003
1016
def test_description_setter_bad_value (self ):
1004
1017
dataset = DatasetReference (self .PROJECT , self .DS_ID )
1005
1018
table_ref = dataset .table (self .TABLE_NAME )
You can’t perform that action at this time.
0 commit comments