| ============================= test session starts ==============================
|
| platform linux -- Python 3.11.9, pytest-8.0.2, pluggy-1.5.0 -- /usr/local/bin/python3
|
| cachedir: /tmp
|
| rootdir: /scripts/pxq-tests
|
| plugins: allure-pytest-2.13.2, django-4.8.0
|
| collecting ... collected 33 items
|
|
|
| scripts/pxq-tests/test_enexis_meters.py::TestClass::test_validate_electricity_meter_turnovers ERROR
|
| scripts/pxq-tests/test_enexis_meters.py::TestClass::test_validate_elect_meter_turnovers_interpolation ERROR
|
| scripts/pxq-tests/test_interpolation.py::TestClass::test_file_exists_electricity_interpolation FAILED
|
| scripts/pxq-tests/test_interpolation.py::TestClass::test_file_exists_gas_interpolation FAILED
|
| scripts/pxq-tests/test_interpolation.py::TestClass::test_file_exists_gas_start_date_interpolation FAILED
|
| scripts/pxq-tests/test_interpolation.py::TestClass::test_file_exists_gas_end_date_interpolation FAILED
|
| scripts/pxq-tests/test_interpolation.py::TestClass::test_validate_electricity_interpolation ERROR
|
| scripts/pxq-tests/test_interpolation.py::TestClass::test_validate_gas_interpolation ERROR
|
| scripts/pxq-tests/test_interpolation.py::TestClass::test_validate_gas_start_date_interpolation ERROR
|
| scripts/pxq-tests/test_interpolation.py::TestClass::test_validate_gas_end_date_interpolation ERROR
|
| scripts/pxq-tests/test_meter_changes.py::TestClass::test_validate_electricity_meter_changes ERROR
|
| scripts/pxq-tests/test_meter_changes.py::TestClass::test_validate_gas_meter_changes ERROR
|
| scripts/pxq-tests/test_negative_volumes.py::TestClass::test_validate_error_gas_negative_volumes FAILED
|
| scripts/pxq-tests/test_negative_volumes.py::TestClass::test_validate_error_electricity_negative_volumes FAILED
|
| scripts/pxq-tests/test_output.py::TestClass::test_file_exists_electricity FAILED
|
| scripts/pxq-tests/test_output.py::TestClass::test_file_exists_gas FAILED
|
| scripts/pxq-tests/test_output.py::TestClass::test_file_exists_gas_corrected FAILED
|
| scripts/pxq-tests/test_output.py::TestClass::test_validate_output_json ERROR
|
| scripts/pxq-tests/test_output.py::TestClass::test_validate_output_json_gas ERROR
|
| scripts/pxq-tests/test_output.py::TestClass::test_validate_output_json_gas_corrected ERROR
|
| scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price FAILED
|
| scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price_future_dates FAILED
|
| scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price_more_than_two_days FAILED
|
| scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price_startdate_after_enddate FAILED
|
| scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price_validate_database_records FAILED
|
| scripts/pxq-tests/test_usage.py::TestClass::test_electricity_usage FAILED
|
| scripts/pxq-tests/test_usage.py::TestClass::test_electricity_usage_week FAILED
|
| scripts/pxq-tests/test_usage.py::TestClass::test_electricity_price FAILED
|
| scripts/pxq-tests/test_usage.py::TestClass::test_electricity_usage_month FAILED
|
| scripts/pxq-tests/test_usage.py::TestClass::test_gas_usage FAILED
|
| scripts/pxq-tests/test_usage.py::TestClass::test_gas_usage_week FAILED
|
| scripts/pxq-tests/test_usage.py::TestClass::test_gas_usage_month FAILED
|
| scripts/pxq-tests/test_usage.py::TestClass::test_gas_price FAILED
|
|
|
| ==================================== ERRORS ====================================
|
| ____ ERROR at setup of TestClass.test_validate_electricity_meter_turnovers _____
|
|
|
| self = <test_enexis_meters.TestClass object at 0xffff9c13e7d0>
|
| file_electricity_meter_turnovers = '/output/processed-event-54839673.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_elect_meter_turnovers(self, file_electricity_meter_turnovers):
|
| > return read_json_file(file_electricity_meter_turnovers)
|
|
|
| scripts/pxq-tests/test_enexis_meters.py:33:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| filepath = '/output/processed-event-54839673.json'
|
|
|
| def read_json_file(filepath):
|
| > with open(filepath) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-54839673.json'
|
|
|
| scripts/pxq-tests/test_enexis_meters.py:10: FileNotFoundError
|
| _ ERROR at setup of TestClass.test_validate_elect_meter_turnovers_interpolation _
|
|
|
| self = <test_enexis_meters.TestClass object at 0xffff9ba388d0>
|
| file_electricity_meter_turnovers_interpolation = '/output/processed-event-54671706.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_elect_meter_turnovers_interpolation(self, file_electricity_meter_turnovers_interpolation):
|
| > return read_json_file(file_electricity_meter_turnovers_interpolation)
|
|
|
| scripts/pxq-tests/test_enexis_meters.py:37:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| filepath = '/output/processed-event-54671706.json'
|
|
|
| def read_json_file(filepath):
|
| > with open(filepath) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-54671706.json'
|
|
|
| scripts/pxq-tests/test_enexis_meters.py:10: FileNotFoundError
|
| _____ ERROR at setup of TestClass.test_validate_electricity_interpolation ______
|
|
|
| self = <test_interpolation.TestClass object at 0xffff9ba2a410>
|
| filename_elect = '/output/processed-event-53755202.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_electricity(self, filename_elect):
|
| > return read_json_file(filename_elect)
|
|
|
| scripts/pxq-tests/test_interpolation.py:45:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| filepath = '/output/processed-event-53755202.json'
|
|
|
| def read_json_file(filepath):
|
| > with open(filepath) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-53755202.json'
|
|
|
| scripts/pxq-tests/test_interpolation.py:10: FileNotFoundError
|
| _________ ERROR at setup of TestClass.test_validate_gas_interpolation __________
|
|
|
| self = <test_interpolation.TestClass object at 0xffff9ba2b3d0>
|
| filename_gas = '/output/processed-event-22537552.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_gas(self, filename_gas):
|
| > return read_json_file(filename_gas)
|
|
|
| scripts/pxq-tests/test_interpolation.py:49:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| filepath = '/output/processed-event-22537552.json'
|
|
|
| def read_json_file(filepath):
|
| > with open(filepath) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-22537552.json'
|
|
|
| scripts/pxq-tests/test_interpolation.py:10: FileNotFoundError
|
| ____ ERROR at setup of TestClass.test_validate_gas_start_date_interpolation ____
|
|
|
| self = <test_interpolation.TestClass object at 0xffff9ba29550>
|
| filename_gas_start_date_no_readings = '/output/processed-event-12253755.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_gas_start_date_no_readings(self, filename_gas_start_date_no_readings):
|
| > return read_json_file(filename_gas_start_date_no_readings)
|
|
|
| scripts/pxq-tests/test_interpolation.py:53:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| filepath = '/output/processed-event-12253755.json'
|
|
|
| def read_json_file(filepath):
|
| > with open(filepath) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-12253755.json'
|
|
|
| scripts/pxq-tests/test_interpolation.py:10: FileNotFoundError
|
| _____ ERROR at setup of TestClass.test_validate_gas_end_date_interpolation _____
|
|
|
| self = <test_interpolation.TestClass object at 0xffff9baaa790>
|
| filename_gas_end_date_no_readings = '/output/processed-event-11225375.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_gas_end_date_no_readings(self, filename_gas_end_date_no_readings):
|
| > return read_json_file(filename_gas_end_date_no_readings)
|
|
|
| scripts/pxq-tests/test_interpolation.py:57:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| filepath = '/output/processed-event-11225375.json'
|
|
|
| def read_json_file(filepath):
|
| > with open(filepath) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-11225375.json'
|
|
|
| scripts/pxq-tests/test_interpolation.py:10: FileNotFoundError
|
| _____ ERROR at setup of TestClass.test_validate_electricity_meter_changes ______
|
|
|
| self = <test_meter_changes.TestClass object at 0xffff9ba2a490>
|
| filename_elect_meter_changes = '/output/processed-event-54674581.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_elect_meter_changes(self, filename_elect_meter_changes):
|
| > return read_json_file(filename_elect_meter_changes)
|
|
|
| scripts/pxq-tests/test_meter_changes.py:38:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| filepath = '/output/processed-event-54674581.json'
|
|
|
| def read_json_file(filepath):
|
| > with open(filepath) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-54674581.json'
|
|
|
| scripts/pxq-tests/test_meter_changes.py:10: FileNotFoundError
|
| _________ ERROR at setup of TestClass.test_validate_gas_meter_changes __________
|
|
|
| self = <test_meter_changes.TestClass object at 0xffff9baa9250>
|
| filename_gas_meter_changes = '/output/processed-event-22007908.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_gas_meter_changes(self, filename_gas_meter_changes):
|
| > return read_json_file(filename_gas_meter_changes)
|
|
|
| scripts/pxq-tests/test_meter_changes.py:34:
|
| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
| filepath = '/output/processed-event-22007908.json'
|
|
|
| def read_json_file(filepath):
|
| > with open(filepath) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-22007908.json'
|
|
|
| scripts/pxq-tests/test_meter_changes.py:10: FileNotFoundError
|
| ____________ ERROR at setup of TestClass.test_validate_output_json _____________
|
|
|
| self = <test_output.TestClass object at 0xffff9a89da90>
|
| filename_elect = '/output/processed-event-40093248.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_electricity(self, filename_elect):
|
| > with open(filename_elect) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-40093248.json'
|
|
|
| scripts/pxq-tests/test_output.py:33: FileNotFoundError
|
| __________ ERROR at setup of TestClass.test_validate_output_json_gas ___________
|
|
|
| self = <test_output.TestClass object at 0xffff9a89e190>
|
| filename_gas = '/output/processed-event-19922630.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_gas(self, filename_gas):
|
| > with open(filename_gas) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-19922630.json'
|
|
|
| scripts/pxq-tests/test_output.py:38: FileNotFoundError
|
| _____ ERROR at setup of TestClass.test_validate_output_json_gas_corrected ______
|
|
|
| self = <test_output.TestClass object at 0xffff9a89ec10>
|
| filename_gas_corrected = '/output/processed-event-25375520.json'
|
|
|
| @pytest.fixture
|
| def kafka_output_json_gas_corrected(self, filename_gas_corrected):
|
| > with open(filename_gas_corrected) as json_file:
|
| E FileNotFoundError: [Errno 2] No such file or directory: '/output/processed-event-25375520.json'
|
|
|
| scripts/pxq-tests/test_output.py:43: FileNotFoundError
|
| =================================== FAILURES ===================================
|
| _____________ TestClass.test_file_exists_electricity_interpolation _____________
|
|
|
| self = <test_interpolation.TestClass object at 0xffff9ba2bd10>
|
| filename_elect = '/output/processed-event-53755202.json'
|
|
|
| def test_file_exists_electricity_interpolation(self, filename_elect):
|
| > assert os.path.exists(filename_elect), "electricity output file does not exist."
|
| E AssertionError: electricity output file does not exist.
|
| E assert False
|
| E + where False = <function exists at 0xffff9cf679c0>('/output/processed-event-53755202.json')
|
| E + where <function exists at 0xffff9cf679c0> = <module 'posixpath' (frozen)>.exists
|
| E + where <module 'posixpath' (frozen)> = os.path
|
|
|
| scripts/pxq-tests/test_interpolation.py:76: AssertionError
|
| _________________ TestClass.test_file_exists_gas_interpolation _________________
|
|
|
| self = <test_interpolation.TestClass object at 0xffff9ba2be50>
|
| filename_gas = '/output/processed-event-22537552.json'
|
|
|
| def test_file_exists_gas_interpolation(self, filename_gas):
|
| > assert os.path.exists(filename_gas), "Gas output file does not exist."
|
| E AssertionError: Gas output file does not exist.
|
| E assert False
|
| E + where False = <function exists at 0xffff9cf679c0>('/output/processed-event-22537552.json')
|
| E + where <function exists at 0xffff9cf679c0> = <module 'posixpath' (frozen)>.exists
|
| E + where <module 'posixpath' (frozen)> = os.path
|
|
|
| scripts/pxq-tests/test_interpolation.py:79: AssertionError
|
| ___________ TestClass.test_file_exists_gas_start_date_interpolation ____________
|
|
|
| self = <test_interpolation.TestClass object at 0xffff9ba2a850>
|
| filename_gas_start_date_no_readings = '/output/processed-event-12253755.json'
|
|
|
| def test_file_exists_gas_start_date_interpolation(self, filename_gas_start_date_no_readings):
|
| > assert os.path.exists(filename_gas_start_date_no_readings), "Gas start date interpolation output file does not exist."
|
| E AssertionError: Gas start date interpolation output file does not exist.
|
| E assert False
|
| E + where False = <function exists at 0xffff9cf679c0>('/output/processed-event-12253755.json')
|
| E + where <function exists at 0xffff9cf679c0> = <module 'posixpath' (frozen)>.exists
|
| E + where <module 'posixpath' (frozen)> = os.path
|
|
|
| scripts/pxq-tests/test_interpolation.py:82: AssertionError
|
| ____________ TestClass.test_file_exists_gas_end_date_interpolation _____________
|
|
|
| self = <test_interpolation.TestClass object at 0xffff9ba2a7d0>
|
| filename_gas_end_date_no_readings = '/output/processed-event-11225375.json'
|
|
|
| def test_file_exists_gas_end_date_interpolation(self, filename_gas_end_date_no_readings):
|
| > assert os.path.exists(filename_gas_end_date_no_readings), "Gas end date interpolation output file does not exist."
|
| E AssertionError: Gas end date interpolation output file does not exist.
|
| E assert False
|
| E + where False = <function exists at 0xffff9cf679c0>('/output/processed-event-11225375.json')
|
| E + where <function exists at 0xffff9cf679c0> = <module 'posixpath' (frozen)>.exists
|
| E + where <module 'posixpath' (frozen)> = os.path
|
|
|
| scripts/pxq-tests/test_interpolation.py:85: AssertionError
|
| ______________ TestClass.test_validate_error_gas_negative_volumes ______________
|
|
|
| self = <test_negative_volumes.TestClass object at 0xffff9b94bf50>
|
|
|
| def test_validate_error_gas_negative_volumes(self):
|
| response = read_from_postgres("select sub_status , flagged_reason from ds_dynamic_pricing_event_results where customer_id=93386112")
|
| > assert response[0] == ('ERROR', 'PXQ303: Calculated Volume is negative')
|
| E AssertionError: assert (None, None) == ('ERROR', 'PXQ303: Calculated Volume is negative')
|
| E
|
| E At index 0 diff: None != 'ERROR'
|
| E
|
| E Full diff:
|
| E (
|
| E - 'ERROR',
|
| E - 'PXQ303: Calculated Volume is negative',
|
| E + None,
|
| E + None,
|
| E )
|
|
|
| scripts/pxq-tests/test_negative_volumes.py:12: AssertionError
|
| __________ TestClass.test_validate_error_electricity_negative_volumes __________
|
|
|
| self = <test_negative_volumes.TestClass object at 0xffff9aa6b550>
|
|
|
| def test_validate_error_electricity_negative_volumes(self):
|
| response = read_from_postgres("select sub_status , flagged_reason from ds_dynamic_pricing_event_results where customer_id=29338611")
|
| > assert response[0] == ('ERROR', 'PXQ303: Calculated Volume is negative')
|
| E AssertionError: assert (None, None) == ('ERROR', 'PXQ303: Calculated Volume is negative')
|
| E
|
| E At index 0 diff: None != 'ERROR'
|
| E
|
| E Full diff:
|
| E (
|
| E - 'ERROR',
|
| E - 'PXQ303: Calculated Volume is negative',
|
| E + None,
|
| E + None,
|
| E )
|
|
|
| scripts/pxq-tests/test_negative_volumes.py:16: AssertionError
|
| ____________________ TestClass.test_file_exists_electricity ____________________
|
|
|
| self = <test_output.TestClass object at 0xffff9a89f490>
|
| filename_elect = '/output/processed-event-40093248.json'
|
|
|
| def test_file_exists_electricity(self, filename_elect):
|
| > assert os.path.exists(filename_elect), "electricity output file does not exist."
|
| E AssertionError: electricity output file does not exist.
|
| E assert False
|
| E + where False = <function exists at 0xffff9cf679c0>('/output/processed-event-40093248.json')
|
| E + where <function exists at 0xffff9cf679c0> = <module 'posixpath' (frozen)>.exists
|
| E + where <module 'posixpath' (frozen)> = os.path
|
|
|
| scripts/pxq-tests/test_output.py:72: AssertionError
|
| ________________________ TestClass.test_file_exists_gas ________________________
|
|
|
| self = <test_output.TestClass object at 0xffff9a89fed0>
|
| filename_gas = '/output/processed-event-19922630.json'
|
|
|
| def test_file_exists_gas(self, filename_gas):
|
| > assert os.path.exists(filename_gas), "Gas output file does not exist."
|
| E AssertionError: Gas output file does not exist.
|
| E assert False
|
| E + where False = <function exists at 0xffff9cf679c0>('/output/processed-event-19922630.json')
|
| E + where <function exists at 0xffff9cf679c0> = <module 'posixpath' (frozen)>.exists
|
| E + where <module 'posixpath' (frozen)> = os.path
|
|
|
| scripts/pxq-tests/test_output.py:75: AssertionError
|
| ___________________ TestClass.test_file_exists_gas_corrected ___________________
|
|
|
| self = <test_output.TestClass object at 0xffff9a89dbd0>
|
| filename_gas_corrected = '/output/processed-event-25375520.json'
|
|
|
| def test_file_exists_gas_corrected(self, filename_gas_corrected):
|
| > assert os.path.exists(filename_gas_corrected), "Gas temperature Corrected output file does not exist."
|
| E AssertionError: Gas temperature Corrected output file does not exist.
|
| E assert False
|
| E + where False = <function exists at 0xffff9cf679c0>('/output/processed-event-25375520.json')
|
| E + where <function exists at 0xffff9cf679c0> = <module 'posixpath' (frozen)>.exists
|
| E + where <module 'posixpath' (frozen)> = os.path
|
|
|
| scripts/pxq-tests/test_output.py:78: AssertionError
|
| ________________________ TestClass.test_recovery_price _________________________
|
|
|
| self = <test_recovery_price.TestClass object at 0xffff9a899bd0>
|
| access_token = ''
|
|
|
| def test_recovery_price(self, access_token):
|
| response = send_post_request(access_token, "2022-12-04T02:00:00.000Z", "2022-12-05T02:00:00.000Z")
|
| > assert response == {'message': 'Price recovery process completed successfully'}
|
| E AssertionError: assert '' == {'message': 'Price recovery process completed successfully'}
|
|
|
| scripts/pxq-tests/test_recovery_price.py:15: AssertionError
|
| __________________ TestClass.test_recovery_price_future_dates __________________
|
|
|
| self = <test_recovery_price.TestClass object at 0xffff9a641ed0>
|
| access_token = ''
|
|
|
| def test_recovery_price_future_dates(self,access_token):
|
| response = send_post_request(access_token, "2030-12-04T02:00:00.000Z", "2030-12-05T02:00:00.000Z")
|
| > assert response == "End timestamp cannot be in the future beyond two days from now."
|
| E AssertionError: assert '' == 'End timestamp cannot be in the future beyond two days from now.'
|
| E
|
| E - End timestamp cannot be in the future beyond two days from now.
|
|
|
| scripts/pxq-tests/test_recovery_price.py:19: AssertionError
|
| _______________ TestClass.test_recovery_price_more_than_two_days _______________
|
|
|
| self = <test_recovery_price.TestClass object at 0xffff9a642550>
|
| access_token = ''
|
|
|
| def test_recovery_price_more_than_two_days(self,access_token):
|
| response = send_post_request(access_token, "2022-12-04T02:00:00.000Z", "2022-12-08T02:00:00.000Z")
|
| > assert response == "End timestamp cannot be more than two days ahead of start timestamp."
|
| E AssertionError: assert '' == 'End timestamp cannot be more than two days ahead of start timestamp.'
|
| E
|
| E - End timestamp cannot be more than two days ahead of start timestamp.
|
|
|
| scripts/pxq-tests/test_recovery_price.py:23: AssertionError
|
| ____________ TestClass.test_recovery_price_startdate_after_enddate _____________
|
|
|
| self = <test_recovery_price.TestClass object at 0xffff9a642cd0>
|
| access_token = ''
|
|
|
| def test_recovery_price_startdate_after_enddate(self,access_token):
|
| response = send_post_request(access_token, "2022-12-10T02:00:00.000Z", "2022-12-08T02:00:00.000Z")
|
| > assert response == "Start timestamp must be before end timestamp."
|
| E AssertionError: assert '' == 'Start timestamp must be before end timestamp.'
|
| E
|
| E - Start timestamp must be before end timestamp.
|
|
|
| scripts/pxq-tests/test_recovery_price.py:27: AssertionError
|
| ___________ TestClass.test_recovery_price_validate_database_records ____________
|
|
|
| self = <test_recovery_price.TestClass object at 0xffff9a643410>
|
| access_token = ''
|
|
|
| def test_recovery_price_validate_database_records(self,access_token):
|
| database_response_before = read_from_postgres("2021-12-10T02:00:00.000Z", "2021-12-11T02:00:00.000Z")
|
| response = send_post_request(access_token, "2021-12-10T02:00:00.000Z", "2021-12-11T02:00:00.000Z")
|
| > assert response == {'message': 'Price recovery process completed successfully'}
|
| E AssertionError: assert '' == {'message': 'Price recovery process completed successfully'}
|
|
|
| scripts/pxq-tests/test_recovery_price.py:32: AssertionError
|
| _______________________ TestClass.test_electricity_usage _______________________
|
|
|
| self = <test_usage.TestClass object at 0xffff9a6fc4d0>
|
| expected_electricity_usage_day = {'data': {'connections': [{'aggregatedIntervalData': [{'code': 'KWHT', 'commercialPriceComponent': {...}, 'endTimestam...s': [], ...}], 'endTimestamp': '2023-05-02T00:00:00+02:00', 'startTimestamp': '2023-05-01T00:00:00+02:00'}, 'meta': {}}
|
| access_token = ''
|
|
|
| def test_electricity_usage(self, expected_electricity_usage_day , access_token):
|
| response = get_usage_price_for_customer(access_token, "eneco", "40093248", "1", "2023-05-01T00:00:00%2B02:00", "2023-05-02T00:00:00%2B02:00", "DAY")
|
| > assert response.status_code == 200
|
| E assert 401 == 200
|
| E + where 401 = <Response [401]>.status_code
|
|
|
| scripts/pxq-tests/test_usage.py:74: AssertionError
|
| ____________________ TestClass.test_electricity_usage_week _____________________
|
|
|
| self = <test_usage.TestClass object at 0xffff9a6fcdd0>
|
| expected_electricity_usage_week = {'data': {'connections': [{'aggregatedIntervalData': [{'code': 'KWHT', 'commercialPriceComponent': {...}, 'endTimestam...s': [], ...}], 'endTimestamp': '2023-06-01T00:00:00+02:00', 'startTimestamp': '2023-05-01T00:00:00+02:00'}, 'meta': {}}
|
| access_token = ''
|
|
|
| def test_electricity_usage_week(self, expected_electricity_usage_week, access_token):
|
| response = get_usage_price_for_customer(access_token, "eneco", "40093248", "1", "2023-05-01T00:00:00%2B02:00", "2023-06-01T00:00:00%2B02:00", "WEEK")
|
| > assert response.status_code == 200
|
| E assert 401 == 200
|
| E + where 401 = <Response [401]>.status_code
|
|
|
| scripts/pxq-tests/test_usage.py:79: AssertionError
|
| _______________________ TestClass.test_electricity_price _______________________
|
|
|
| self = <test_usage.TestClass object at 0xffff9a6fd4d0>
|
| expected_electricity_usage_hour = {'data': {'connections': [{'aggregatedIntervalData': [{'code': 'KWHT', 'commercialPriceComponent': {...}, 'endTimestam...s': [], ...}], 'endTimestamp': '2023-05-02T00:00:00+02:00', 'startTimestamp': '2023-05-01T00:00:00+02:00'}, 'meta': {}}
|
| access_token = ''
|
|
|
| def test_electricity_price(self, expected_electricity_usage_hour ,access_token):
|
| response = get_usage_price_for_customer(access_token, "eneco", "40093248", "1", "2023-05-01T00:00:00%2B02:00", "2023-05-02T00:00:00%2B02:00", "HOUR")
|
| > assert response.status_code == 200
|
| E assert 401 == 200
|
| E + where 401 = <Response [401]>.status_code
|
|
|
| scripts/pxq-tests/test_usage.py:84: AssertionError
|
| ____________________ TestClass.test_electricity_usage_month ____________________
|
|
|
| self = <test_usage.TestClass object at 0xffff9a6fde10>
|
| expected_electricity_usage_month = {'data': {'connections': [{'aggregatedIntervalData': [{'code': 'KWHT', 'commercialPriceComponent': {...}, 'endTimestam...s': [], ...}], 'endTimestamp': '2023-06-01T00:00:00+02:00', 'startTimestamp': '2023-04-01T00:00:00+02:00'}, 'meta': {}}
|
| access_token = ''
|
|
|
| def test_electricity_usage_month(self, expected_electricity_usage_month ,access_token):
|
| response = get_usage_price_for_customer(access_token, "eneco", "40093248", "1", "2023-04-01T00:00:00%2B02:00", "2023-06-01T00:00:00%2B02:00", "MONTH")
|
| > assert response.status_code == 200
|
| E assert 401 == 200
|
| E + where 401 = <Response [401]>.status_code
|
|
|
| scripts/pxq-tests/test_usage.py:89: AssertionError
|
| ___________________________ TestClass.test_gas_usage ___________________________
|
|
|
| self = <test_usage.TestClass object at 0xffff9a6fe290>
|
| expected_gas_usage_day = {'data': {'connections': [{'aggregatedIntervalData': [{'code': 'M3GAS', 'commercialPriceComponent': {...}, 'endTimesta...s': [], ...}], 'endTimestamp': '2023-05-02T00:00:00+02:00', 'startTimestamp': '2023-05-01T00:00:00+02:00'}, 'meta': {}}
|
| access_token = ''
|
|
|
| def test_gas_usage(self, expected_gas_usage_day, access_token):
|
| response = get_usage_price_for_customer(access_token, "eneco", "19922630", "1", "2023-05-01T00:00:00%2B02:00", "2023-05-02T00:00:00%2B02:00", "DAY")
|
| > assert response.status_code == 200
|
| E assert 401 == 200
|
| E + where 401 = <Response [401]>.status_code
|
|
|
| scripts/pxq-tests/test_usage.py:94: AssertionError
|
| ________________________ TestClass.test_gas_usage_week _________________________
|
|
|
| self = <test_usage.TestClass object at 0xffff9a6ff210>
|
| expected_gas_usage_week = {'data': {'connections': [{'aggregatedIntervalData': [{'code': 'M3GAS', 'commercialPriceComponent': {...}, 'endTimesta...s': [], ...}], 'endTimestamp': '2023-06-01T00:00:00+02:00', 'startTimestamp': '2023-05-01T00:00:00+02:00'}, 'meta': {}}
|
| access_token = ''
|
|
|
| def test_gas_usage_week(self, expected_gas_usage_week, access_token):
|
| response = get_usage_price_for_customer(access_token, "eneco", "19922630", "1", "2023-05-01T00:00:00%2B02:00", "2023-06-01T00:00:00%2B02:00", "WEEK")
|
| > assert response.status_code == 200
|
| E assert 401 == 200
|
| E + where 401 = <Response [401]>.status_code
|
|
|
| scripts/pxq-tests/test_usage.py:99: AssertionError
|
| ________________________ TestClass.test_gas_usage_month ________________________
|
|
|
| self = <test_usage.TestClass object at 0xffff9a6fea50>
|
| expected_gas_usage_month = {'data': {'connections': [{'aggregatedIntervalData': [{'code': 'M3GAS', 'commercialPriceComponent': {...}, 'endTimesta...s': [], ...}], 'endTimestamp': '2023-06-01T00:00:00+02:00', 'startTimestamp': '2023-05-01T00:00:00+02:00'}, 'meta': {}}
|
| access_token = ''
|
|
|
| def test_gas_usage_month(self, expected_gas_usage_month,access_token):
|
| response = get_usage_price_for_customer(access_token, "eneco", "19922630", "1", "2023-05-01T00:00:00%2B02:00", "2023-06-01T00:00:00%2B02:00", "MONTH")
|
| > assert response.status_code == 200
|
| E assert 401 == 200
|
| E + where 401 = <Response [401]>.status_code
|
|
|
| scripts/pxq-tests/test_usage.py:104: AssertionError
|
| ___________________________ TestClass.test_gas_price ___________________________
|
|
|
| self = <test_usage.TestClass object at 0xffff9a6ffa10>
|
| expected_gas_usage_hour = {'data': {'connections': [{'aggregatedIntervalData': [{'code': 'M3GAS', 'commercialPriceComponent': {...}, 'endTimesta...s': [], ...}], 'endTimestamp': '2023-05-02T00:00:00+02:00', 'startTimestamp': '2023-05-01T00:00:00+02:00'}, 'meta': {}}
|
| access_token = ''
|
|
|
| def test_gas_price(self, expected_gas_usage_hour,access_token):
|
| response = get_usage_price_for_customer(access_token, "eneco", "19922630", "1", "2023-05-01T00:00:00%2B02:00", "2023-05-02T00:00:00%2B02:00", "HOUR")
|
| > assert response.status_code == 200
|
| E assert 401 == 200
|
| E + where 401 = <Response [401]>.status_code
|
|
|
| scripts/pxq-tests/test_usage.py:109: AssertionError
|
| ---------------- generated xml file: /scripts/test_reports.xml -----------------
|
| =========================== short test summary info ============================
|
| FAILED scripts/pxq-tests/test_interpolation.py::TestClass::test_file_exists_electricity_interpolation
|
| FAILED scripts/pxq-tests/test_interpolation.py::TestClass::test_file_exists_gas_interpolation
|
| FAILED scripts/pxq-tests/test_interpolation.py::TestClass::test_file_exists_gas_start_date_interpolation
|
| FAILED scripts/pxq-tests/test_interpolation.py::TestClass::test_file_exists_gas_end_date_interpolation
|
| FAILED scripts/pxq-tests/test_negative_volumes.py::TestClass::test_validate_error_gas_negative_volumes
|
| FAILED scripts/pxq-tests/test_negative_volumes.py::TestClass::test_validate_error_electricity_negative_volumes
|
| FAILED scripts/pxq-tests/test_output.py::TestClass::test_file_exists_electricity
|
| FAILED scripts/pxq-tests/test_output.py::TestClass::test_file_exists_gas - As...
|
| FAILED scripts/pxq-tests/test_output.py::TestClass::test_file_exists_gas_corrected
|
| FAILED scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price
|
| FAILED scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price_future_dates
|
| FAILED scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price_more_than_two_days
|
| FAILED scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price_startdate_after_enddate
|
| FAILED scripts/pxq-tests/test_recovery_price.py::TestClass::test_recovery_price_validate_database_records
|
| FAILED scripts/pxq-tests/test_usage.py::TestClass::test_electricity_usage - a...
|
| FAILED scripts/pxq-tests/test_usage.py::TestClass::test_electricity_usage_week
|
| FAILED scripts/pxq-tests/test_usage.py::TestClass::test_electricity_price - a...
|
| FAILED scripts/pxq-tests/test_usage.py::TestClass::test_electricity_usage_month
|
| FAILED scripts/pxq-tests/test_usage.py::TestClass::test_gas_usage - assert 40...
|
| FAILED scripts/pxq-tests/test_usage.py::TestClass::test_gas_usage_week - asse...
|
| FAILED scripts/pxq-tests/test_usage.py::TestClass::test_gas_usage_month - ass...
|
| FAILED scripts/pxq-tests/test_usage.py::TestClass::test_gas_price - assert 40...
|
| ERROR scripts/pxq-tests/test_enexis_meters.py::TestClass::test_validate_electricity_meter_turnovers
|
| ERROR scripts/pxq-tests/test_enexis_meters.py::TestClass::test_validate_elect_meter_turnovers_interpolation
|
| ERROR scripts/pxq-tests/test_interpolation.py::TestClass::test_validate_electricity_interpolation
|
| ERROR scripts/pxq-tests/test_interpolation.py::TestClass::test_validate_gas_interpolation
|
| ERROR scripts/pxq-tests/test_interpolation.py::TestClass::test_validate_gas_start_date_interpolation
|
| ERROR scripts/pxq-tests/test_interpolation.py::TestClass::test_validate_gas_end_date_interpolation
|
| ERROR scripts/pxq-tests/test_meter_changes.py::TestClass::test_validate_electricity_meter_changes
|
| ERROR scripts/pxq-tests/test_meter_changes.py::TestClass::test_validate_gas_meter_changes
|
| ERROR scripts/pxq-tests/test_output.py::TestClass::test_validate_output_json
|
| ERROR scripts/pxq-tests/test_output.py::TestClass::test_validate_output_json_gas
|
| ERROR scripts/pxq-tests/test_output.py::TestClass::test_validate_output_json_gas_corrected
|
| ======================== 22 failed, 11 errors in 1.01s =========================
|