|
1 | 1 | import os |
2 | 2 | from unittest import TestCase |
3 | 3 |
|
4 | | -from investing_algorithm_framework import create_app, PortfolioConfiguration, \ |
5 | | - MarketCredential, Algorithm, AppMode, APP_MODE, RESOURCE_DIRECTORY |
6 | 4 | from investing_algorithm_framework.cli.initialize_app import command |
7 | | -from tests.resources import MarketServiceStub |
8 | 5 |
|
9 | 6 |
|
10 | 7 | class TestAppInitialize(TestCase): |
@@ -100,15 +97,15 @@ def test_init_command_default(self): |
100 | 97 |
|
101 | 98 | # Check if market_data_providers.py file exists |
102 | 99 | market_data_providers_file_path = os.path.join( |
103 | | - strategy_dir_path, "market_data_providers.py" |
| 100 | + strategy_dir_path, "data_providers.py" |
104 | 101 | ) |
105 | 102 | self.assertTrue(os.path.exists(market_data_providers_file_path)) |
106 | 103 |
|
107 | 104 | # Check if the market_data_providers.py is the same as the template |
108 | 105 | self.assertTrue( |
109 | 106 | self.is_same_file_content( |
110 | 107 | market_data_providers_file_path, |
111 | | - os.path.join(self.template_dir, "market_data_providers.py.template") |
| 108 | + os.path.join(self.template_dir, "data_providers.py.template") |
112 | 109 | ) |
113 | 110 | ) |
114 | 111 |
|
@@ -207,15 +204,15 @@ def test_initialize_command_web(self): |
207 | 204 |
|
208 | 205 | # Check if market_data_providers.py file exists |
209 | 206 | market_data_providers_file_path = os.path.join( |
210 | | - strategy_dir_path, "market_data_providers.py" |
| 207 | + strategy_dir_path, "data_providers.py" |
211 | 208 | ) |
212 | 209 | self.assertTrue(os.path.exists(market_data_providers_file_path)) |
213 | 210 |
|
214 | 211 | # Check if the market_data_providers.py is the same as the template |
215 | 212 | self.assertTrue( |
216 | 213 | self.is_same_file_content( |
217 | 214 | market_data_providers_file_path, |
218 | | - os.path.join(self.template_dir, "market_data_providers.py.template") |
| 215 | + os.path.join(self.template_dir, "data_providers.py.template") |
219 | 216 | ) |
220 | 217 | ) |
221 | 218 |
|
@@ -314,15 +311,15 @@ def test_initialize_command_azure_function(self): |
314 | 311 |
|
315 | 312 | # Check if market_data_providers.py file exists |
316 | 313 | market_data_providers_file_path = os.path.join( |
317 | | - strategy_dir_path, "market_data_providers.py" |
| 314 | + strategy_dir_path, "data_providers.py" |
318 | 315 | ) |
319 | 316 | self.assertTrue(os.path.exists(market_data_providers_file_path)) |
320 | 317 |
|
321 | 318 | # Check if the market_data_providers.py is the same as the template |
322 | 319 | self.assertTrue( |
323 | 320 | self.is_same_file_content( |
324 | 321 | market_data_providers_file_path, |
325 | | - os.path.join(self.template_dir, "market_data_providers.py.template") |
| 322 | + os.path.join(self.template_dir, "data_providers.py.template") |
326 | 323 | ) |
327 | 324 | ) |
328 | 325 |
|
@@ -366,11 +363,12 @@ def test_initialize_command_azure_function(self): |
366 | 363 | self.assertTrue( |
367 | 364 | self.is_same_file_content( |
368 | 365 | env_example_file_path, |
369 | | - os.path.join(self.template_dir, "env.example.template") |
| 366 | + os.path.join( |
| 367 | + self.template_dir, "env_azure_function.example.template" |
| 368 | + ) |
370 | 369 | ) |
371 | 370 | ) |
372 | 371 |
|
373 | | - |
374 | 372 | def is_same_file_content(self, file1, file2): |
375 | 373 | with open(file1, 'r') as f1, open(file2, 'r') as f2: |
376 | 374 | content1 = f1.read() |
|
0 commit comments