# Path: pycounter/sushi.py
# NS = pycounter.constants.NS
# def get_sushi_stats_raw(
#     wsdl_url,
#     start_date,
#     end_date,
#     requestor_id=None,
#     requestor_email=None,
#     requestor_name=None,
#     customer_reference=None,
#     customer_name=None,
#     report="JR1",
#     release=4,
#     sushi_dump=False,
#     verify=True,
#     **extra_params,
# ):
# def get_status(url: str, release: int) -> str:
# def get_report(*args, **kwargs):
# def ns(namespace, name):
# def raw_to_full(raw_report):
# 
# Path: pycounter/sushiclient.py
# def main(
#     url,
#     report,
#     release,
#     start_date,
#     end_date,
#     requestor_id,
#     requestor_email,
#     requestor_name,
#     customer_name,
#     customer_reference,
#     api_key,
#     format_,
#     output_file,
#     dump,
#     no_ssl_verify,
#     no_delay,
#     status,
# ):


import datetime
import logging
import os
import mock
import pytest
import pycounter.exceptions
from click.testing import CliRunner
from httmock import HTTMock, urlmatch
from pycounter import sushi
from pycounter import sushiclient
    """Test trying to use implied start date and explicit end date"""
    arglist = ["http://www.example.com/Sushi", "-e", "2015-12-31"]
    runner = CliRunner()
    result = runner.invoke(sushiclient.main, arglist)
    assert result.exit_code == 1


def test_sushi_client_explicit_dates():
    """Test providing both start and end dates"""
    arglist = ["http://www.example.com/Sushi", "-s", "2015-10-31", "-e", "2015-12-31"]
    with HTTMock(sushi_mock):
        runner = CliRunner()
        with runner.isolated_filesystem():
            result = runner.invoke(sushiclient.main, arglist)
            assert result.exit_code == 0


def test_sushi_client_queued_report():
    """Test that queued report is retried"""
    arglist = [
        "http://www.example.com/Sushi",
        "-s",
        "2013-01-01",
        "-e",
        "2013-01-31",
        "--no-delay",
    ]
    with HTTMock(report_queued_mock):
        runner = CliRunner()
        with runner.isolated_filesystem():

# Path: pycounter/sushi.py
# NS = pycounter.constants.NS
# def get_sushi_stats_raw(
#     wsdl_url,
#     start_date,
#     end_date,
#     requestor_id=None,
#     requestor_email=None,
#     requestor_name=None,
#     customer_reference=None,
#     customer_name=None,
#     report="JR1",
#     release=4,
#     sushi_dump=False,
#     verify=True,
#     **extra_params,
# ):
# def get_status(url: str, release: int) -> str:
# def get_report(*args, **kwargs):
# def ns(namespace, name):
# def raw_to_full(raw_report):
# 
# Path: pycounter/sushiclient.py
# def main(
#     url,
#     report,
#     release,
#     start_date,
#     end_date,
#     requestor_id,
#     requestor_email,
#     requestor_name,
#     customer_name,
#     customer_reference,
#     api_key,
#     format_,
#     output_file,
#     dump,
#     no_ssl_verify,
#     no_delay,
#     status,
# ):


# Path: pycounter/test/test_sushi.py
import datetime
import logging
import os
import mock
import pytest
import pycounter.exceptions
from click.testing import CliRunner
from httmock import HTTMock, urlmatch
from pycounter import sushi
from pycounter import sushiclient

    """Test trying to use implied start date and explicit end date"""
    arglist = ["http://www.example.com/Sushi", "-e", "2015-12-31"]
    runner = CliRunner()
    result = runner.invoke(sushiclient.main, arglist)
    assert result.exit_code == 1


def test_sushi_client_explicit_dates():
    """Test providing both start and end dates"""
    arglist = ["http://www.example.com/Sushi", "-s", "2015-10-31", "-e", "2015-12-31"]
    with HTTMock(sushi_mock):
        runner = CliRunner()
        with runner.isolated_filesystem():
            result = runner.invoke(sushiclient.main, arglist)
            assert result.exit_code == 0


def test_sushi_client_queued_report():
    """Test that queued report is retried"""
    arglist = [
        "http://www.example.com/Sushi",
        "-s",
        "2013-01-01",
        "-e",
        "2013-01-31",
        "--no-delay",
    ]
    with HTTMock(report_queued_mock):
        runner = CliRunner()
        with runner.isolated_filesystem():

            result = runner.invoke(sushiclient.main, arglist)