def test_format_order_by(): res = _format_order_by("cloudcoverpercentage") assert res == "cloudcoverpercentage asc" res = _format_order_by("+cloudcoverpercentage,-beginposition") assert res == "cloudcoverpercentage asc,beginposition desc" res = _format_order_by(" +cloudcoverpercentage, -beginposition ") assert res == "cloudcoverpercentage asc,beginposition desc" with pytest.raises(ValueError) as excinfo: _format_order_by("+cloudcoverpercentage-beginposition")
def test_format_order_by(): res = _format_order_by("cloudcoverpercentage") assert res == "cloudcoverpercentage asc" res = _format_order_by("+cloudcoverpercentage,-beginposition") assert res == "cloudcoverpercentage asc,beginposition desc" res = _format_order_by(" +cloudcoverpercentage, -beginposition ") assert res == "cloudcoverpercentage asc,beginposition desc" with pytest.raises(ValueError) as excinfo: _format_order_by("+cloudcoverpercentage-beginposition")