diff --git a/README.md b/README.md index 69f96cd..83915e2 100644 --- a/README.md +++ b/README.md @@ -1 +1,52 @@ -# 2023.2-UnB-TV-VideoService \ No newline at end of file +# 2023.2-UnB-TV-VideoService + +
+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 | 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 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