Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix /discovery-methods endpoint #33

Merged
merged 1 commit into from Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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]))