Hi Kumar,<br> First of all thanks a lot for the response. <br><br><div class="gmail_quote">On Wed, Nov 18, 2009 at 11:42 PM, Kumar McMillan <span dir="ltr"><<a href="mailto:kumar.mcmillan@gmail.com">kumar.mcmillan@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Wed, Nov 18, 2009 at 10:51 AM, Madhusudan C.S <<a href="mailto:madhusudancs@gmail.com">madhusudancs@gmail.com</a>> wrote:<br>
> Hello everyone,<br>
> I am using fixture module for testing purposes on Appengine. When I run<br>
> the tests, I get this error<br>
<br>
</div>Hi Madhusudan. By default when loading a class named UserData,<br>
fixture will look for an appengine db model class named User. The<br>
error indicates that fixture is not finding that User class in the<br>
module you have sent to GoogleDatastoreFixture(env=your_module)<br></blockquote><div><br>The data models for our app doesn't reside in a single Python module, but<br>spread across several Python modules in the package called models. <br>
<br>Can you please tell me what should I do in this case? How should my <br><br>datafixture = GoogleDatastoreFixture(env=models, style=NamedDataStyle()) # Note models is a package containing models in each file, for example user model is in the module user.py.<br>
self.data = datafixture.data(datasets.UserData)<br><br>be rewritten. Please help me. <br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5"><br>
><br>
> Traceback (most recent call last):<br>
> File<br>
> "/media/python/workspace/melange-ghop-integration/tests/app/soc/modules/ghop/views/models/test_task.py",<br>
> line 130, in setUp<br>
> self.data.setup()<br>
> File<br>
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/base.py",<br>
> line 71, in setup<br>
> self.loader.load(self.data)<br>
> File<br>
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",<br>
> line 193, in load<br>
> self.wrap_in_transaction(loader, unloading=False)<br>
> File<br>
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",<br>
> line 310, in wrap_in_transaction<br>
> routine()<br>
> File<br>
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",<br>
> line 192, in loader<br>
> self.load_dataset(ds)<br>
> File<br>
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",<br>
> line 217, in load_dataset<br>
> self.attach_storage_medium(ds)<br>
> File<br>
> "/media/python/workspace/melange-ghop-integration/eggs/fixture-1.3.1-py2.5.egg/fixture/loadable/loadable.py",<br>
> line 375, in attach_storage_medium<br>
> self.Medium, ds.meta.storable_name, ds, repr_env))<br>
> StorageMediaNotFound: could not find <class<br>
> 'fixture.loadable.google_datastore_loadable.EntityMedium'> 'User' for<br>
> dataset <UserData at 0xa84decc with keys ['user_0001']> in self.env (<type<br>
> 'module'>)<br>
><br>
> Can some one please tell me why I get this error and what I should to do to<br>
> fix this?<br>
><br>
><br>
> --<br>
> Thanks and regards,<br>
> Madhusudan.C.S<br>
><br>
> Blogs at: <a href="http://www.madhusudancs.info" target="_blank">www.madhusudancs.info</a><br>
> My Online Identity: madhusudancs<br>
><br>
</div></div>> _______________________________________________<br>
> testing-in-python mailing list<br>
> <a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
> <a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
><br>
><br>
</blockquote></div><br><br clear="all"><br>-- <br>Thanks and regards,<br> Madhusudan.C.S<br><br>Blogs at: <a href="http://www.madhusudancs.info">www.madhusudancs.info</a><br>My Online Identity: madhusudancs<br>