Skip to content

Commit

Permalink
Merge pull request #33 from ikalnitsky/discovery-method
Browse files Browse the repository at this point in the history
Fix /discovery-methods endpoint
  • Loading branch information
sc68cal committed Sep 12, 2016
2 parents cf2c772 + 6315fb8 commit b123d7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kostyor/db/api.py
Expand Up @@ -40,8 +40,8 @@ def get_upgrade(upgrade_id):
return u_task.to_dict()


def get_discovery_methods(db_session):
return {'discovery_methods': constants.DISCOVERY_METHODS}
def get_discovery_methods():
return constants.DISCOVERY_METHODS


def get_upgrade_versions(cluster_id):
Expand Down
5 changes: 5 additions & 0 deletions kostyor/tests/unit/test_db_api.py
Expand Up @@ -70,3 +70,8 @@ def test_update_cluster(self):
result = db_api.get_cluster(cluster['id'])

self.assertEqual(update['name'], result['name'])

def test_discovery_methods(self):
methods = db_api.get_discovery_methods()
# we don't care about ordering here, so let's compare sorted arrays
self.assertEqual(sorted(methods), sorted([constants.OPENSTACK]))

0 comments on commit b123d7e

Please sign in to comment.