@@ -1307,14 +1307,14 @@ def test_user_delete(self):
13071307 def test_collections_add (self ):
13081308 self .c .collections .add ("items" , {"data" : 1 }, id = str (uuid1 ()), user_id = "tom" )
13091309
1310+ def test_collections_add_no_id (self ):
1311+ self .c .collections .add ("items" , {"data" : 1 })
1312+
13101313 def test_collections_add_twice (self ):
13111314 id = str (uuid1 ())
1312- r1 = self .c .collections .add ("items" , {"data" : 1 }, id = id )
1313- r2 = self .c .collections .add ("items" , {"data" : 2 }, id = id )
1314- entry = self .c .collections .get ("items" , id )
1315- self .assertEqual (entry ["data" ], r2 ["data" ])
1316- self .assertEqual (r1 ["created_at" ], r2 ["created_at" ])
1317- self .assertNotEqual (r1 ["updated_at" ], r2 ["updated_at" ])
1315+ self .c .collections .add ("items" , {"data" : 1 }, id = id )
1316+ with self .assertRaises (StreamApiException ):
1317+ self .c .collections .add ("items" , {"data" : 2 }, id = id )
13181318
13191319 def test_collections_get (self ):
13201320 response = self .c .collections .add ("items" , {"data" : 1 }, id = str (uuid1 ()))
0 commit comments