# Path: async_v20/endpoints/annotations.py
# class Bool(object):
# class Authorization(str):
# class Instruments(str):
# class Alias(str):
# class Count(int):
# class Smooth(Bool):
# class IncludeFirstQuery(Bool):
# class DailyAlignment(int):
# class AlignmentTimezone(str):
# class Ids(str):
# class LongUnits(str):
# class ShortUnits(str):
# class Snapshot(Bool):
# class PageSize(int):
# class Type(str):
# class UserSpecifier(str):
# class FromTime(DateTime):
# class ToTime(DateTime):
# class TradeClientExtensions(ClientExtensions):
# class LongClientExtensions(ClientExtensions):
# class ShortClientExtensions(ClientExtensions):
# class Units(str):
# class LastTransactionID(TransactionID):
# class SinceTransactionID(TransactionID):
# class FromTransactionID(TransactionID):
# class ToTransactionID(TransactionID):
# class ServiceID(str):
# class ServiceListID(str):
# class Start(str):
# class End(str):
# class EventSid(str):
# class StatusID(str):
#     def __new__(cls, arg):
#     def __new__(cls, value=500):
#     def __new__(cls, value=False):
#     def __new__(cls, value=True):
#     def __new__(cls, value=17):
#     def __new__(cls, value='America/New_York'):
#     def __new__(cls, value='ALL'):
#     def __new__(cls, value='ALL'):
#     def __new__(cls, value=True):
#     def __new__(cls, value=100):
#     def __new__(cls, value='ALL'):


import random
import pytest
import logging
from async_v20.endpoints import annotations

def test_count_only_allows_valid_data():
    with pytest.raises(ValueError):
        annotations.Count(0)

    with pytest.raises(ValueError):
        annotations.Count(5001)

    assert annotations.Count(random.randrange(1, 5001))

    assert int(annotations.Count()) == 500


def test_daily_alignment_only_allows_valid_data():
    with pytest.raises(ValueError):
        annotations.DailyAlignment(-1)

    with pytest.raises(ValueError):
        annotations.DailyAlignment(24)

    assert annotations.Count(random.randrange(1, 23))

    assert int(annotations.DailyAlignment()) == 17


def test_page_size_only_allows_valid_data():
    with pytest.raises(ValueError):
        annotations.PageSize(-1)

    with pytest.raises(ValueError):

# Path: async_v20/endpoints/annotations.py
# class Bool(object):
# class Authorization(str):
# class Instruments(str):
# class Alias(str):
# class Count(int):
# class Smooth(Bool):
# class IncludeFirstQuery(Bool):
# class DailyAlignment(int):
# class AlignmentTimezone(str):
# class Ids(str):
# class LongUnits(str):
# class ShortUnits(str):
# class Snapshot(Bool):
# class PageSize(int):
# class Type(str):
# class UserSpecifier(str):
# class FromTime(DateTime):
# class ToTime(DateTime):
# class TradeClientExtensions(ClientExtensions):
# class LongClientExtensions(ClientExtensions):
# class ShortClientExtensions(ClientExtensions):
# class Units(str):
# class LastTransactionID(TransactionID):
# class SinceTransactionID(TransactionID):
# class FromTransactionID(TransactionID):
# class ToTransactionID(TransactionID):
# class ServiceID(str):
# class ServiceListID(str):
# class Start(str):
# class End(str):
# class EventSid(str):
# class StatusID(str):
#     def __new__(cls, arg):
#     def __new__(cls, value=500):
#     def __new__(cls, value=False):
#     def __new__(cls, value=True):
#     def __new__(cls, value=17):
#     def __new__(cls, value='America/New_York'):
#     def __new__(cls, value='ALL'):
#     def __new__(cls, value='ALL'):
#     def __new__(cls, value=True):
#     def __new__(cls, value=100):
#     def __new__(cls, value='ALL'):


# Path: tests/test_endpoints/test_annotations.py
import random
import pytest
import logging
from async_v20.endpoints import annotations


def test_count_only_allows_valid_data():
    with pytest.raises(ValueError):
        annotations.Count(0)

    with pytest.raises(ValueError):
        annotations.Count(5001)

    assert annotations.Count(random.randrange(1, 5001))

    assert int(annotations.Count()) == 500


def test_daily_alignment_only_allows_valid_data():
    with pytest.raises(ValueError):
        annotations.DailyAlignment(-1)

    with pytest.raises(ValueError):
        annotations.DailyAlignment(24)

    assert annotations.Count(random.randrange(1, 23))

    assert int(annotations.DailyAlignment()) == 17


def test_page_size_only_allows_valid_data():
    with pytest.raises(ValueError):
        annotations.PageSize(-1)

    with pytest.raises(ValueError):

        annotations.PageSize(1001)