Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/units/client/solver.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/units/client/solver.py')
-rwxr-xr-xtests/units/client/solver.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/units/client/solver.py b/tests/units/client/solver.py
index b3d9666..88ee931 100755
--- a/tests/units/client/solver.py
+++ b/tests/units/client/solver.py
@@ -106,7 +106,10 @@ class SolverTest(tests.Test):
{'version': '1', 'guid': 'dep1', 'context': 'dep1', 'stability': 'packaged', 'license': None},
{'version': '1', 'guid': 'dep2', 'context': 'dep2', 'stability': 'packaged', 'license': None},
{'version': '1', 'guid': 'dep3', 'context': 'dep3', 'stability': 'packaged', 'license': None},
- {'version': '1', 'command': ['echo'], 'context': context, 'guid': impl, 'stability': 'stable', 'license': ['GPLv3+']},
+ {'version': '1', 'context': context, 'guid': impl, 'stability': 'stable', 'license': ['GPLv3+'],
+ 'data': {'spec': {'*-*': {'commands': {'activity': {'exec': 'echo'}}, 'requires':
+ {'dep2': {'restrictions': [['1', '2']]}, 'dep3': {}}}}},
+ 'requires': {'dep1': {}, 'dep2': {}}},
]),
sorted(solver.solve(self.client_routes.fallback, context, ['stable'])))
@@ -155,7 +158,8 @@ class SolverTest(tests.Test):
},
}})
self.assertEqual([
- {'version': '1', 'command': ['echo'], 'context': context, 'guid': impl, 'stability': 'stable', 'license': ['GPLv3+']},
+ {'version': '1', 'context': context, 'guid': impl, 'stability': 'stable', 'license': ['GPLv3+'],
+ 'data': {'spec': {'*-*': {'commands': {'activity': {'exec': 'echo'}}, 'requires': {'sugar': {}}}}}},
{'version': '0.94', 'context': 'sugar', 'guid': 'sugar-0.94', 'stability': 'packaged', 'license': None},
],
solver.solve(self.client_routes.fallback, context, ['stable']))
@@ -175,7 +179,9 @@ class SolverTest(tests.Test):
},
}})
self.assertEqual([
- {'version': '1', 'command': ['echo'], 'context': context, 'guid': impl, 'stability': 'stable', 'license': ['GPLv3+']},
+ {'version': '1', 'context': context, 'guid': impl, 'stability': 'stable', 'license': ['GPLv3+'],
+ 'data': {'spec': {'*-*': {'commands': {'activity': {'exec': 'echo'}}, 'requires':
+ {'sugar': {'restrictions': [['0.80', '0.87']]}}}}}},
{'version': '0.86', 'context': 'sugar', 'guid': 'sugar-0.86', 'stability': 'packaged', 'license': None},
],
solver.solve(self.client_routes.fallback, context, ['stable']))
@@ -225,7 +231,8 @@ class SolverTest(tests.Test):
},
}})
self.assertEqual([
- {'version': '1', 'command': ['echo'], 'context': context, 'guid': impl, 'stability': 'stable', 'license': ['GPLv3+']},
+ {'version': '1', 'context': context, 'guid': impl, 'stability': 'stable', 'license': ['GPLv3+'],
+ 'data': {'spec': {'*-*': {'commands': {'activity': {'exec': 'echo'}}, 'requires': {'sugar': {}}}}}},
{'version': '0.94', 'context': 'sugar', 'guid': 'sugar-0.94', 'stability': 'packaged', 'license': None},
],
solver.solve(self.client_routes.fallback, context, ['stable']))