# Path: qarnot/status.py
# class Status(object):
#     """Status
#         The status object of the running pools and tasks.
#         To retrieve the status of a pool, use:
#             * my_pool.status
# 
#         To retrieve the status of a task, use:
#             * my_task.status
# 
#     .. note:: Read-only class
#     """
#     def __init__(self, json):
#         self.download_progress = json['downloadProgress']
#         """:type: :class:`float`
# 
#         Resources download progress to the instances."""
# 
#         self.execution_progress = json['executionProgress']
#         """:type: :class:`float`
# 
#         Task execution progress."""
# 
#         self.upload_progress = json['uploadProgress']
#         """:type: :class:`float`
# 
#         Task results upload progress to the API."""
# 
#         self.instance_count = json['instanceCount']
#         """:type: :class:`int`
# 
#         Number of running instances."""
# 
#         self.download_time = json['downloadTime']
#         """:type: :class:`str`
# 
#         Resources download time to the instances."""
# 
#         self.download_time_sec = json['downloadTimeSec']
#         """:type: :class:`float`
# 
#         Resources download time to the instances in seconds."""
# 
#         self.environment_time = json['environmentTime']
#         """:type: :class:`str`
# 
#         Environment time to the instances."""
# 
#         self.environment_time_sec = json['environmentTimeSec']
#         """:type: :class:`float`
# 
#         Environment time to the instances in seconds."""
# 
#         self.execution_time = json['executionTime']
#         """:type: :class:`str`
# 
#         Task execution time."""
# 
#         self.execution_time_sec = json['executionTimeSec']
#         """:type: :class:`float`
# 
#         Task execution time in seconds."""
# 
#         self.upload_time = json['uploadTime']
#         """:type: :class:`str`
# 
#         Task results upload time to the API."""
# 
#         self.upload_time_sec = json['uploadTimeSec']
#         """:type: :class:`float`
# 
#         Task results upload time to the API in seconds."""
# 
#         self.wall_time = json["wallTime"]
#         """:type: :class:`str`
# 
#         Wall time of the task."""
# 
#         self.wall_time_sec = json["wallTimeSec"]
#         """:type: :class:`float`
# 
#         Wall time of the task in seconds."""
# 
#         self.succeeded_range = json['succeededRange']
#         """:type: :class:`str`
# 
#         Successful instances range."""
# 
#         self.executed_range = json['executedRange']
#         """:type: :class:`str`
# 
#         Executed instances range."""
# 
#         self.failed_range = json['failedRange']
#         """:type: :class:`str`
# 
#         Failed instances range."""
# 
#         self.last_update_timestamp = json["lastUpdateTimestamp"]
#         """:type: :class:`str`
# 
#         Last update time (UTC)."""
# 
#         self.execution_time_by_cpu_model = [ExecutionTimeByCpuModel(timeCpu) for timeCpu in json["executionTimeByCpuModel"]]
#         """:type: :class:`str`
# 
#         Execution time by cpu."""
# 
#         self.execution_time_ghz_by_cpu_model = [ExecutionTimeGhzByCpuModel(timeCpu) for timeCpu in json["executionTimeGhzByCpuModel"]]
#         """:type: :class:`str`
# 
#         Execution time ghz by cpu."""
# 
#         self.running_instances_info = None
#         """:type: :class:`RunningInstancesInfo`
# 
#         Running instances information."""
# 
#         if 'runningInstancesInfo' in json and json['runningInstancesInfo'] is not None:
#             self.running_instances_info = RunningInstancesInfo(json['runningInstancesInfo'])
# 
#     def __repr__(self):
#         if sys.version_info > (3, 0):
#             return ', '.join("{0}={1}".format(key, val) for (key, val) in self.__dict__.items())
#         else:
#             return ', '.join("{0}={1}".format(key, val) for (key, val) in self.__dict__.iteritems())  # pylint: disable=no-member
# 
# Path: test/mock_status.py



import datetime
import pytest
from qarnot.status import Status
from .mock_status import default_json_status



class TestStatusProperties:
    @pytest.mark.parametrize("property_name, expected_value", [
        ("last_update_timestamp", default_json_status["lastUpdateTimestamp"]),
    ])
    def test_create_status_hydrate_property_values(self, property_name,  expected_value):

# Path: qarnot/status.py
# class Status(object):
#     """Status
#         The status object of the running pools and tasks.
#         To retrieve the status of a pool, use:
#             * my_pool.status
# 
#         To retrieve the status of a task, use:
#             * my_task.status
# 
#     .. note:: Read-only class
#     """
#     def __init__(self, json):
#         self.download_progress = json['downloadProgress']
#         """:type: :class:`float`
# 
#         Resources download progress to the instances."""
# 
#         self.execution_progress = json['executionProgress']
#         """:type: :class:`float`
# 
#         Task execution progress."""
# 
#         self.upload_progress = json['uploadProgress']
#         """:type: :class:`float`
# 
#         Task results upload progress to the API."""
# 
#         self.instance_count = json['instanceCount']
#         """:type: :class:`int`
# 
#         Number of running instances."""
# 
#         self.download_time = json['downloadTime']
#         """:type: :class:`str`
# 
#         Resources download time to the instances."""
# 
#         self.download_time_sec = json['downloadTimeSec']
#         """:type: :class:`float`
# 
#         Resources download time to the instances in seconds."""
# 
#         self.environment_time = json['environmentTime']
#         """:type: :class:`str`
# 
#         Environment time to the instances."""
# 
#         self.environment_time_sec = json['environmentTimeSec']
#         """:type: :class:`float`
# 
#         Environment time to the instances in seconds."""
# 
#         self.execution_time = json['executionTime']
#         """:type: :class:`str`
# 
#         Task execution time."""
# 
#         self.execution_time_sec = json['executionTimeSec']
#         """:type: :class:`float`
# 
#         Task execution time in seconds."""
# 
#         self.upload_time = json['uploadTime']
#         """:type: :class:`str`
# 
#         Task results upload time to the API."""
# 
#         self.upload_time_sec = json['uploadTimeSec']
#         """:type: :class:`float`
# 
#         Task results upload time to the API in seconds."""
# 
#         self.wall_time = json["wallTime"]
#         """:type: :class:`str`
# 
#         Wall time of the task."""
# 
#         self.wall_time_sec = json["wallTimeSec"]
#         """:type: :class:`float`
# 
#         Wall time of the task in seconds."""
# 
#         self.succeeded_range = json['succeededRange']
#         """:type: :class:`str`
# 
#         Successful instances range."""
# 
#         self.executed_range = json['executedRange']
#         """:type: :class:`str`
# 
#         Executed instances range."""
# 
#         self.failed_range = json['failedRange']
#         """:type: :class:`str`
# 
#         Failed instances range."""
# 
#         self.last_update_timestamp = json["lastUpdateTimestamp"]
#         """:type: :class:`str`
# 
#         Last update time (UTC)."""
# 
#         self.execution_time_by_cpu_model = [ExecutionTimeByCpuModel(timeCpu) for timeCpu in json["executionTimeByCpuModel"]]
#         """:type: :class:`str`
# 
#         Execution time by cpu."""
# 
#         self.execution_time_ghz_by_cpu_model = [ExecutionTimeGhzByCpuModel(timeCpu) for timeCpu in json["executionTimeGhzByCpuModel"]]
#         """:type: :class:`str`
# 
#         Execution time ghz by cpu."""
# 
#         self.running_instances_info = None
#         """:type: :class:`RunningInstancesInfo`
# 
#         Running instances information."""
# 
#         if 'runningInstancesInfo' in json and json['runningInstancesInfo'] is not None:
#             self.running_instances_info = RunningInstancesInfo(json['runningInstancesInfo'])
# 
#     def __repr__(self):
#         if sys.version_info > (3, 0):
#             return ', '.join("{0}={1}".format(key, val) for (key, val) in self.__dict__.items())
#         else:
#             return ', '.join("{0}={1}".format(key, val) for (key, val) in self.__dict__.iteritems())  # pylint: disable=no-member
# 
# Path: test/mock_status.py



# Path: test/test_status.py
import datetime
import pytest
from qarnot.status import Status
from .mock_status import default_json_status




class TestStatusProperties:
    @pytest.mark.parametrize("property_name, expected_value", [
        ("last_update_timestamp", default_json_status["lastUpdateTimestamp"]),
    ])
    def test_create_status_hydrate_property_values(self, property_name,  expected_value):

        status = Status(default_json_status)