Skip to content

Commit

Permalink
Merge "Remove docstrings in tests"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Sep 11, 2013
2 parents 24b8110 + 7869acf commit be57317
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions nova/tests/db/test_db_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,6 @@ def assert_multi_filter_instance_type_get(filters=None):
assert_multi_filter_instance_type_get(filts)

def test_flavor_get_all_limit_sort(self):
"""Test sorting getting all flavours."""
def assert_sorted_by_key_dir(sort_key, asc=True):
sort_dir = 'asc' if asc else 'desc'
results = db.flavor_get_all(self.ctxt, sort_key='name',
Expand All @@ -2564,12 +2563,10 @@ def assert_sorted_by_key_both_dir(sort_key):
assert_sorted_by_key_both_dir(attr)

def test_flavor_get_all_limit(self):
"""Check a limit can be applied to db.flavor_get_all."""
limited_flavors = db.flavor_get_all(self.ctxt, limit=2)
self.assertEqual(2, len(limited_flavors))

def test_flavor_get_all_list_marker(self):
"""Check results can be returned after marker"""
all_flavors = db.flavor_get_all(self.ctxt)

# Set the 3rd result as the marker
Expand Down
7 changes: 0 additions & 7 deletions nova/tests/test_flavors.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@ def test_read_deleted_false_converting_flavorid(self):
self.assertEqual("instance_type1_redo", instance_type["name"])

def test_get_all_flavors_sorted_list_sort(self):
"""Test getting all flavors as a sorted list with
flavors.get_all_flavors_sorted_list.
"""
# Test default sort
all_flavors = flavors.get_all_flavors_sorted_list()
self.assertEqual(DEFAULT_FLAVORS, all_flavors)
Expand All @@ -244,14 +241,10 @@ def test_get_all_flavors_sorted_list_sort(self):
self.assertEqual(expected, all_flavors)

def test_get_all_flavors_sorted_list_limit(self):
"""Check a limit can be applied to
flavors.get_all_flavors_sorted_list.
"""
limited_flavors = flavors.get_all_flavors_sorted_list(limit=2)
self.assertEqual(2, len(limited_flavors))

def test_get_all_flavors_sorted_list_marker(self):
"""Check results can be returned after marker"""
all_flavors = flavors.get_all_flavors_sorted_list()

# Set the 3rd result as the marker
Expand Down

0 comments on commit be57317

Please sign in to comment.