import StringIO
import sys
import urlparse
-import yaml
import libbe
import libbe.storage
+import libbe.storage.util.mapfile
import libbe.ui.util.user
import libbe.util.encoding
import libbe.util.http
raise NotImplementedError
def _run_remote(self, **kwargs):
- data = yaml.safe_dump({
+ data = libbe.storage.util.mapfile.generate({
'command': self.name,
'parameters': kwargs,
- })
+ }, context=0)
url = urlparse.urljoin(self.server, 'run')
page,final_url,info = libbe.util.http.get_post_url(
url=url, get=False, data=data, agent=self.user_agent)
import urllib
import wsgiref.simple_server
-import yaml
-
import libbe
import libbe.command
import libbe.command.base
+import libbe.storage.util.mapfile
import libbe.util.wsgi
import libbe.version
# handler utility functions
def _parse_post(self, post):
- return yaml.safe_load(post)
+ return libbe.storage.util.mapfile.parse(post)
def check_login(self, environ):
user = environ.get('be-auth.user', None)
def test_run_list(self):
list = libbe.command.list.List()
params = list._parse_options_args()
- data = yaml.safe_dump({
+ data = libbe.storage.util.mapfile.generate({
'command': 'list',
'parameters': params,
- })
+ }, context=0)
self.getURL(self.app, '/run', method='POST', data=data)
self.failUnless(self.status.startswith('200 '), self.status)
self.failUnless(