Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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):
_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):
_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):
_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):
_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):
_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):
_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):
_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):
_format_order_by("+cloudcoverpercentage-beginposition")