From 95b790370bfdefbbf62e049c86545c0ae6a9a7a9 Mon Sep 17 00:00:00 2001 From: Diego Carlito Date: Sat, 9 Dec 2023 19:25:58 -0300 Subject: [PATCH 1/5] =?UTF-8?q?Adiciona=20teste=20para=20tratamento=20de?= =?UTF-8?q?=20exce=C3=A7=C3=A3o=20em=20get=5Fschedule=5Fday?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_schedule.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test_schedule.py b/tests/test_schedule.py index e45753b..6cbfa46 100644 --- a/tests/test_schedule.py +++ b/tests/test_schedule.py @@ -1,5 +1,6 @@ import pytest from fastapi.testclient import TestClient +from unittest.mock import patch from src.main import app from src.constants import errorMessages @@ -26,4 +27,14 @@ def test_schedule_get_schedule_specific_day(self): response = client.get("/api/schedule/", params=params) data = response.json() assert response.status_code == 200 - assert len(data) > 0 \ No newline at end of file + assert len(data) > 0 + + def test_schedule_get_schedule_day_exception_handling(self): + with patch("src.controller.scheduleController.requests.get") as mock_get: + mock_get.side_effect = Exception("Test exception") + + response = client.get("/api/schedule/") + data = response.json() + + assert response.status_code == 400 + assert data['error'] == errorMessages.ERROR_RETRIEVING_SCHEDULE \ No newline at end of file From da4552ad790872880453fc7af9ae0d9d4600ec36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor?= Date: Sat, 9 Dec 2023 23:20:33 -0300 Subject: [PATCH 2/5] Atualiza README --- README.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 69f96cd..9c843ce 100644 --- a/README.md +++ b/README.md @@ -1 +1,52 @@ -# 2023.2-UnB-TV-VideoService \ No newline at end of file +# UnB-TV Video Service + +
+logo UNBTV
+ +## Sobre + +O projeto visa o desenvolvimento de uma aplicação Web e Mobile para a UnB-TV, com o objetivo de centralizar e disponibilizar de forma unificada todo o conteúdo oferecido pela UnB-TV, incluindo vídeos e transmissões ao vivo, sendo desenvolvida no segundo semestre de 2023 pelas disciplinas de EPS e MDS da Universidade de Brasília. + +## Ambientes + +[Documentação](https://github.com/fga-eps-mds/2023.2-UnB-TV-DOC) +[Users](https://github.com/fga-eps-mds/2023.2-UnB-TV-Users) +[Admin](https://github.com/fga-eps-mds/2023.2-UnB-TV-Admin) +[Video](https://github.com/fga-eps-mds/2023.2-UnB-TV-VideoService) +[Gateway](https://github.com/fga-eps-mds/2023.2-UnB-TV-API-Gateway) +[Frontend](https://github.com/fga-eps-mds/2023.2-UnB-TV-Frontend) + +## Acessando o repositório localmente + +### Requisitos + +- docker e docker compose + +Primeiro passo é instalar o docker e docker compose, para isso siga os passos de instalação do [docker](https://docs.docker.com/engine/install/) e [docker compose](https://docs.docker.com/compose/install/). + +Execute o servidor local: + +``` +docker compose up +``` + +Acessar o localhost em: http://localhost:8001 + +## Equipe + +| Foto | Nome | Github | Email | Matrícula | +| :-----------------------------------------------------------------------------------------------------------------------------: | :-------------------------------: | :----------------: | :----------------------------: | :-------: | +| Davi Marinho da Silva Campos | Davi Marinho da Silva Campos | @DaviMarinho | davii_marinho@hotmail.com | 190026600 | +| Diego Carlito Rodrigues de Souza | Diego Carlito Rodrigues de Souza | @Diego-Carlito | <221007690@aluno.unb.br> | 221007690 | +| Eric Akio Lages Nishimura | Eric Akio Lages Nishimura | @eric-kingu | <190105895@aluno.unb.br> | 190105895 | +| Gabriela Tiago de Araujo | Gabriela Tiago de Araujo | @GabrielaTiago | <190028475@aluno.unb.br> | 190028475 | +| Gabrielle Ribeiro Gomes | Gabrielle Ribeiro Gomes | @Gabrielle-Ribeiro | gabrielleribeiro2010@gmail.com | 170011020 | +| Geraldo Victor Alves Barbosa | Geraldo Victor Alves Barbosa | @geraldovictor | geraldovictor@outlook.com | 170011119 | +| Jennifer Costa Cansanção | Jennifer Costa Cansanção | @cansancaojennifer | <221007733@aluno.unb.br> | 221007733 | +| Jennifer Costa Cansanção | João Victor de Oliveira Matos | @joao15victor08 | joao15victor08@gmail.com | 170013987 | +| Lucas da Cunha Andrade | Lucas da Cunha Andrade | @nYCSTs | lucascandrade14@hotmail.com | 180105256 | +| Marcos Antonio Teles de Castilhos | Marcos Antonio Teles de Castilhos | @Marcosatc147 | <221008300@aluno.unb.br> | 221008300 | +| Raissa Andrade Silveira | Raissa Andrade Silveira | @RaisSabeAndrade | <221035077@aluno.unb.br> | 221035077 | +| Ricardo de Castro Loureiro | Ricardo de Castro Loureiro | @castroricardo1 | ricardoloureiro75@gmail.com | 200043111 | +| Ana Carolina Rodrigues Leite | Sávio Cunha de Carvalho | @savioc2 | saviocunha61@gmail.com | 180130889 | +| Vitória Aquere Matos | Vitória Aquere Matos | @vitoriaaquere | <190096616@aluno.unb.br> | 190096616 | From 62a0658b0e3ee352b7ecad9cb45b88bc2ccfa545 Mon Sep 17 00:00:00 2001 From: davimarinho Date: Sun, 10 Dec 2023 00:33:20 -0300 Subject: [PATCH 3/5] Corrige sonar Signed-off-by: davimarinho --- sonar-project.properties | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonar-project.properties b/sonar-project.properties index c49b644..fa669c0 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,7 +1,9 @@ -sonar.projectKey=fga-eps-mds_2023.2-UnB-TV-Admin sonar.projectKey=fga-eps-mds_2023.2-UnB-TV-VideoService sonar.organization=fga-eps-mds-1 +sonar.host.url=https://sonarcloud.io +sonar.language=py + sonar.sources=src sonar.tests=tests From 799bdb591af414a7f881dd6d58ba9533caf722fa Mon Sep 17 00:00:00 2001 From: davimarinho Date: Sun, 10 Dec 2023 00:45:21 -0300 Subject: [PATCH 4/5] Corrige sonar Signed-off-by: davimarinho --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69f96cd..bb65560 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# 2023.2-UnB-TV-VideoService \ No newline at end of file +# 2023.2-UnB-TV-VideoService From b50cad1cd229e2d9751288feeb3b6d4c8b6fa723 Mon Sep 17 00:00:00 2001 From: lcsAndrade Date: Sun, 10 Dec 2023 22:17:21 -0300 Subject: [PATCH 5/5] Corrige arquivo de configuracao do sonar --- sonar-project.properties | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index c49b644..69f0e71 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,14 +1,14 @@ -sonar.projectKey=fga-eps-mds_2023.2-UnB-TV-Admin sonar.projectKey=fga-eps-mds_2023.2-UnB-TV-VideoService sonar.organization=fga-eps-mds-1 -sonar.sources=src -sonar.tests=tests - -sonar.exclusions=__pycache__, tests - -sonar.sourceEncoding=UTF-8 +sonar.host.url=https://sonarcloud.io +sonar.language=py +sonar.sources=src +sonar.exclusions=tests sonar.python.version=3.11.5 sonar.python.xunit.reportPath=junit.xml -sonar.python.coverage.reportPaths=coverage.xml \ No newline at end of file +sonar.python.coverage.reportPaths=coverage.xml +sonar.coverage.exclusions=tests/*.py + +sonar.sourceEncoding=UTF-8 \ No newline at end of file