[TIP] Please help for StorageMediaNotFound

Kumar McMillan kumar.mcmillan at gmail.com
Wed Nov 18 10:12:32 PST 2009


On Wed, Nov 18, 2009 at 10:51 AM, Madhusudan C.S <madhusudancs at gmail.com> wrote:
> Hello everyone,
>    I am using fixture module for testing purposes on Appengine. When I run
> the tests, I get this error

Hi Madhusudan.  By default when loading a class named UserData,
fixture will look for an appengine db model class named User.  The
error indicates that fixture is not finding that User class in the
module you have sent to GoogleDatastoreFixture(env=your_module)

>
> Traceback (most recent call last):
>   File
> "/media/python/workspace/melange-ghop-integration/tests/app/soc/modules/ghop/views/models/test_task.py",
> line 130, in setUp
>     self.data.setup()
>   File
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/base.py",
> line 71, in setup
>     self.loader.load(self.data)
>   File
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",
> line 193, in load
>     self.wrap_in_transaction(loader, unloading=False)
>   File
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",
> line 310, in wrap_in_transaction
>     routine()
>   File
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",
> line 192, in loader
>     self.load_dataset(ds)
>   File
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",
> line 217, in load_dataset
>     self.attach_storage_medium(ds)
>   File
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",
> line 375, in attach_storage_medium
>     self.Medium, ds.meta.storable_name, ds, repr_env))
> StorageMediaNotFound: could not find <class
> 'fixture.loadable.google_datastore_loadable.EntityMedium'> 'User' for
> dataset <UserData at 0xa84decc with keys ['user_0001']> in self.env (<type
> 'module'>)
>
> Can some one please tell me why I get this error and what I should to do to
> fix this?
>
>
> --
> Thanks and regards,
>  Madhusudan.C.S
>
> Blogs at: www.madhusudancs.info
> My Online Identity: madhusudancs
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
>



More information about the testing-in-python mailing list