def test_create_invalidates_context(self, m_create):
     from pyramid_caching.ext.royal import CachedCollectionView
     context = mock.Mock()
     ccv = CachedCollectionView(context, None)
     ccv.cached_create()
     context.invalidate.assert_called_once_with()
 def test_calls_create(self, m_create):
     from pyramid_caching.ext.royal import CachedCollectionView
     ccv = CachedCollectionView(mock.Mock(), None)
     response = ccv.cached_create()
     m_create.assert_called_once_with()
     self.assertEqual(m_create.return_value, response)