Fixed tests
This commit is contained in:
parent
2c6eda4ba1
commit
1ec2cfa968
@ -4,3 +4,4 @@ networkx==1.9.1
|
||||
PyYAML==3.11
|
||||
jsonschema==2.4.0
|
||||
requests==2.7.0
|
||||
mock
|
||||
|
@ -28,6 +28,7 @@ class Resource(object):
|
||||
self.metadata = metadata
|
||||
self.actions = metadata['actions'].keys() if metadata['actions'] else None
|
||||
self.args = {}
|
||||
|
||||
for arg_name, arg_value in args.items():
|
||||
if not self.metadata['input'].get(arg_name):
|
||||
continue
|
||||
@ -178,6 +179,7 @@ def assign_resources_to_nodes(resources, nodes):
|
||||
|
||||
signals.connect(created_node, created_resource)
|
||||
|
||||
|
||||
def connect_resources(profile):
|
||||
connections = profile.get('connections', [])
|
||||
graph = ResourcesConnectionGraph(connections, load_all().values())
|
||||
|
@ -4,9 +4,11 @@ import tempfile
|
||||
import unittest
|
||||
import yaml
|
||||
|
||||
from solar.core import db
|
||||
from solar.core import resource as xr
|
||||
from solar.core import signals as xs
|
||||
from solar.interfaces.db import get_db
|
||||
|
||||
db = get_db()
|
||||
|
||||
|
||||
class BaseResourceTest(unittest.TestCase):
|
||||
@ -29,8 +31,4 @@ class BaseResourceTest(unittest.TestCase):
|
||||
return path
|
||||
|
||||
def create_resource(self, name, src, args):
|
||||
dst = os.path.join(self.storage_dir, 'rs', name)
|
||||
os.makedirs(dst)
|
||||
|
||||
return xr.create(name, src, dst, args)
|
||||
|
||||
return xr.create(name, src, args)
|
||||
|
Loading…
Reference in New Issue
Block a user