def test_is_content_range_valid(): assert not _is_content_range_valid( None, 99, 90) assert not _is_content_range_valid( 99, None, 90) assert _is_content_range_valid(None, None, 90) assert not _is_content_range_valid(None, 99, 90) assert _is_content_range_valid(0, 99, None) assert not _is_content_range_valid(0, 99, 90, response=True) assert _is_content_range_valid(9, 99, None, response=True) assert _is_content_range_valid(0, 99, 90)
def test_is_content_range_valid(): assert not _is_content_range_valid(None, 99, 90) assert not _is_content_range_valid(99, None, 90) assert _is_content_range_valid(None, None, 90) assert not _is_content_range_valid(None, 99, 90) assert _is_content_range_valid(0, 99, None) assert not _is_content_range_valid(0, 99, 90, response=True) assert _is_content_range_valid(0, 99, 90)
def test_is_content_range_valid_stop_greater_than_length(): contentrange = ContentRange(0, 99, 100) assert_equal(_is_content_range_valid(0, 99, 90), True)
def test_is_content_range_valid_length_none(): contentrange = ContentRange(0, 99, 100) assert_equal(_is_content_range_valid(0, 99, None), True)
def test_is_content_range_valid_stop_greater_than_length_response(): contentrange = ContentRange(0, 99, 100) assert_equal(_is_content_range_valid(0, 99, 90, response=True), False)
def test_is_content_range_valid_start_none(): contentrange = ContentRange(0, 99, 100) assert_equal(_is_content_range_valid(None, 99, 90), False)