Plone 4.2 のアドオンを開発し、テストを書いています。実行すると
# bin/test -s my.stream
次のエラーが発生しました: KeyError: u'profile-my.common:default' なぜこのエラーが発生するのですか?
役立つかもしれない情報をいくつか紹介します。
トレースバック:
Traceback (most recent call last):
File "/blah/user/blah/00-buildout/eggs/zope.testing-3.9.7-py2.6.egg/zope/testing /testrunner/runner.py", line 366, in run_layer
setup_layer(options, layer, setup_layers)
File "/blah/user/blah/00-buildout/eggs/zope.testing-3.9.7-py2.6.egg/zope/testing/testrunner/runner.py", line 628, in setup_layer
setup_layer(options, base, setup_layers)
File "/blah/user/blah/00-buildout/eggs/zope.testing-3.9.7-py2.6.egg/zope/testing/testrunner/runner.py", line 633, in setup_layer
layer.setUp()
File "/blah/user/blah/00-buildout/eggs/plone.app.testing-4.2-py2.6.egg/plone/app/testing/helpers.py", line 343, in setUp
self.setUpPloneSite(portal)
File "/blah/user/blah/venv26/buildout/src/my.stream/my/stream/testing.py", line 20, in setUpPloneSite
applyProfile(portal, 'my.stream:default')
File "/blah/user/blah/00-buildout/eggs/plone.app.testing-4.2-py2.6.egg/plone/app/testing/helpers.py", line 113, in applyProfile
setupTool.runAllImportStepsFromProfile(profileId)
File "/blah/user/blah/00-buildout/eggs/Products.GenericSetup-1.7.1-py2.6.egg/Products/GenericSetup/tool.py", line 353, in runAllImportStepsFromProfile
ignore_dependencies=ignore_dependencies)
- __traceback_info__: profile-my.stream:default
File "/blah/user/blah/00-buildout/eggs/Products.GenericSetup-1.7.1-py2.6.egg/Products/GenericSetup/tool.py", line 1095, in _runImportStepsFromContext
chain = self.getProfileDependencyChain( profile_id )
File "/blah/user/blah/00-buildout/eggs/Products.GenericSetup-1.7.1-py2.6.egg/Products/GenericSetup/tool.py", line 1078, in getProfileDependencyChain
chain.extend(self.getProfileDependencyChain( dependency, seen ))
File "/blah/user/blah/00-buildout/eggs/Products.GenericSetup-1.7.1-py2.6.egg/Products/GenericSetup/tool.py", line 1078, in getProfileDependencyChain
chain.extend(self.getProfileDependencyChain( dependency, seen ))
File "/blah/user/blah/00-buildout/eggs/Products.GenericSetup-1.7.1-py2.6.egg/Products/GenericSetup/tool.py", line 1076, in getProfileDependencyChain
dependencies = self.getDependenciesForProfile( profile_id )
File "/blah/user/blah/00-buildout/eggs/Products.GenericSetup-1.7.1-py2.6.egg/Products/GenericSetup/tool.py", line 858, in getDependenciesForProfile
raise KeyError, profile_id
KeyError: u'profile-my.common:default'
my.streamはmy.commonに依存します。どちらも /blah/user/blah/buildout/src のアドオンです。それらは mr.developer によって管理されています。
私のビルドアウトには、すべての開発卵が含まれています。
[buildout]
...
eggs =
my.common
my.stream
...
[test]
recipe = zc.recipe.testrunner
defaults = ['--auto-color', '--auto-progress']
eggs =
${instance:eggs}
私のtesting.py:
from plone.app.testing import PloneSandboxLayer
from plone.app.testing import applyProfile
from plone.app.testing import PLONE_FIXTURE
from plone.app.testing import IntegrationTesting
from zope.configuration import xmlconfig
class MyStreamContent(PloneSandboxLayer):
defaultBases = (PLONE_FIXTURE,)
def setUpZope(self, app, configurationContext):
# Load ZCML
import my.stream
xmlconfig.file('configure.zcml',
my.stream,
context=configurationContext)
def setUpPloneSite(self, portal):
applyProfile(portal, 'my.stream:default')
MY__FIXTURE = MyStreamContent()
MY__INTEGRATION_TESTING = IntegrationTesting(
bases=(MY__FIXTURE,),
name='MyStreamContent:Integration')
私は何が欠けていますか?
前もって感謝します。