def test_marker_does_not_exist(self): """Ensure the marker is saved if it does not already exist.""" async_id = "asyncid" store_async_marker(async_id, 0) self.assertIsNotNone(FuriousAsyncMarker.get_by_id(async_id))
def test_marker_does_exist(self): """Ensure the marker is not saved if it already exists.""" async_id = "asyncid" result = '{"foo": "bar"}' FuriousAsyncMarker(id=async_id, result=result, status=1).put() store_async_marker(async_id, 1) marker = FuriousAsyncMarker.get_by_id(async_id) self.assertEqual(marker.result, result) self.assertEqual(marker.status, 1)