예제 #1
0
 def test_resource_timestamp_is_depracated(self):
     with mock.patch("kinto.core.resource.schema.warnings") as mocked:
         schema.TimeStamp()
         message = ("`kinto.core.resource.schema.TimeStamp` is deprecated, "
                    "use `kinto.core.schema.TimeStamp` instead.")
         mocked.warn.assert_called_with(message, DeprecationWarning)
예제 #2
0
 def test_default_value_comes_from_timestamper(self, time_mocked):
     time_mocked.return_value = 666
     default = schema.TimeStamp().deserialize(colander.null)
     self.assertEqual(default, 666)