-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nataliagranato
committed
Mar 20, 2024
1 parent
582997b
commit 2d6da1d
Showing
3 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
from analise_de_custos import get_custom_date_range, list_costs_by_service | ||
""" | ||
Este é o módulo principal do projeto aws_cost_py. | ||
Ele importa e executa as funções do módulo analise_de_custos. | ||
""" | ||
|
||
from .analise_de_custos import get_custom_date_range, list_costs_by_service | ||
|
||
def main(): | ||
""" | ||
Função principal que solicita ao usuário um intervalo de datas e lista os custos dos serviços AWS para esse intervalo. | ||
""" | ||
start_date, end_date = get_custom_date_range() | ||
if start_date and end_date: | ||
list_costs_by_service(start_date, end_date) | ||
list_costs_by_service(start_date, end_date) | ||
|
||
if __name__ == '__main__': | ||
main() | ||
if __name__ == "__main__": | ||
main() |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
""" | ||
Este é o módulo de teste para o módulo analise_de_custos. | ||
Ele contém testes unitários para as funções get_custom_date_range e list_costs_by_service. | ||
""" | ||
|
||
import unittest | ||
from analise_de_custos import get_custom_date_range, list_costs_by_service | ||
from analise_de_custos import get_custom_date_range | ||
|
||
class TestAnaliseDeCustos(unittest.TestCase): | ||
""" | ||
Esta classe contém testes unitários para o módulo analise_de_custos. | ||
""" | ||
|
||
def test_get_custom_date_range_valid_input(self): | ||
start_date, end_date = get_custom_date_range() | ||
""" | ||
Testa a função get_custom_date_range com uma entrada válida. | ||
""" | ||
input_start_date, input_end_date = get_custom_date_range() |