11import unittest
22import uuid
3+ from datetime import datetime
34from datetime import timedelta
45
56if __name__ == '__main__' :
@@ -241,7 +242,8 @@ def test_retrieve_statement(self):
241242 object = self .activity ,
242243 context = self .context ,
243244 result = self .result ,
244- id = str (uuid .uuid4 ())
245+ id = str (uuid .uuid4 ()),
246+ timestamp = datetime .utcnow ()
245247 )
246248 save_resp = self .lrs .save_statement (statement )
247249
@@ -258,7 +260,8 @@ def test_query_statements(self):
258260 verb = self .verb ,
259261 object = self .parent ,
260262 result = self .result ,
261- id = str (uuid .uuid4 ())
263+ id = str (uuid .uuid4 ()),
264+ timestamp = datetime .utcnow ()
262265 )
263266 self .lrs .save_statement (s1 )
264267
@@ -267,7 +270,8 @@ def test_query_statements(self):
267270 verb = self .verb ,
268271 object = self .parent ,
269272 result = self .result ,
270- id = str (uuid .uuid4 ())
273+ id = str (uuid .uuid4 ()),
274+ timestamp = datetime .utcnow ()
271275 )
272276 self .lrs .save_statement (s2 )
273277
@@ -276,7 +280,8 @@ def test_query_statements(self):
276280 verb = self .verb ,
277281 object = self .parent ,
278282 result = self .result ,
279- id = str (uuid .uuid4 ())
283+ id = str (uuid .uuid4 ()),
284+ timestamp = datetime .utcnow ()
280285 )
281286 self .lrs .save_statement (s3 )
282287
@@ -468,7 +473,7 @@ def test_delete_agent_profile(self):
468473
469474 def shallow_compare (self , s1 , s2 , compare_ids = False ):
470475 for k , v in vars (s1 ).iteritems ():
471- if not k == '_id' or compare_ids :
476+ if ( not k == '_stored' and not k == '_authority' ) or compare_ids :
472477 self .assertTrue (hasattr (s2 , k ))
473478 if isinstance (v , Base ):
474479 self .shallow_compare (v , getattr (s2 , k ), True )
0 commit comments