|
1 | 1 | import tempfile |
2 | | -import unittest |
3 | 2 | import uuid |
4 | 3 | from pathlib import Path |
5 | 4 |
|
6 | 5 | from geophires_x_client import GeophiresXClient |
7 | 6 | from geophires_x_client import GeophiresXResult |
| 7 | +from geophires_x_client import ImmutableGeophiresInputParameters |
8 | 8 | from geophires_x_client.geophires_input_parameters import EndUseOption |
9 | 9 | from geophires_x_client.geophires_input_parameters import GeophiresInputParameters |
10 | 10 | from tests.base_test_case import BaseTestCase |
@@ -421,26 +421,22 @@ def test_non_vertical_section_cost(self): |
421 | 421 | self.assertIsNotNone(entry['value']) |
422 | 422 | self.assertEqual(entry['unit'], 'MUSD') |
423 | 423 |
|
424 | | - @unittest.skip( |
425 | | - 'Not currently relevant - ' |
426 | | - 'see TODO in geophires_x_client.geophires_input_parameters.GeophiresInputParameters.__hash__' |
427 | | - ) |
428 | 424 | def test_input_hashing(self): |
429 | | - input1 = GeophiresInputParameters( |
| 425 | + input1 = ImmutableGeophiresInputParameters( |
430 | 426 | {'End-Use Option': EndUseOption.DIRECT_USE_HEAT.value, 'Gradient 1': 50, 'Maximum Temperature': 250} |
431 | 427 | ) |
432 | 428 |
|
433 | | - input2 = GeophiresInputParameters( |
| 429 | + input2 = ImmutableGeophiresInputParameters( |
434 | 430 | {'Maximum Temperature': 250, 'End-Use Option': EndUseOption.DIRECT_USE_HEAT.value, 'Gradient 1': 50} |
435 | 431 | ) |
436 | 432 |
|
437 | | - assert hash(input1) == hash(input2) |
| 433 | + self.assertEqual(hash(input1), hash(input2)) |
438 | 434 |
|
439 | | - input3 = GeophiresInputParameters( |
| 435 | + input3 = ImmutableGeophiresInputParameters( |
440 | 436 | {'Maximum Temperature': 420, 'End-Use Option': EndUseOption.DIRECT_USE_HEAT.value, 'Gradient 1': 69} |
441 | 437 | ) |
442 | 438 |
|
443 | | - assert hash(input1) != hash(input3) |
| 439 | + self.assertNotEqual(hash(input1), hash(input3)) |
444 | 440 |
|
445 | 441 | def test_input_with_non_default_units(self): |
446 | 442 | client = GeophiresXClient() |
|
0 commit comments