def test_context_samples_found(self):
all_plugins = context.Context.get_all()
context_samples_path = os.path.join(self.samples_path, "contexts")
for p in all_plugins:
if not inspect.getfile(p).startswith(
os.path.dirname(xrally_docker.__file__)):
# except contexts which belongs to tests module
continue
elif p.get_name() == "users":
# users is a dummy context for doing nothing
continue
file_name = p.get_name().replace("_", "-")
file_path = os.path.join(context_samples_path, file_name)
if not os.path.exists("%s.json" % file_path):
self.fail(("There is no json sample file of %s,"
"plugin location: %s.json" %
(p.get_name(), file_path)))
评论列表
文章目录