def setUp(self): mock_user = mock.MockUser() relator = mock_user.make_relator() mock_relatorio = mock.MockRelatorio() data = mock_relatorio.make_relatorio() relatorio = mock_relatorio.save_relatorio(data) self.client.force_login(relator) self.resp = self.client.post( r('parecer:parecer_rds1_new', slug=str(relatorio.uuid)), {})
def test_created(self): mock_user = mock.MockUser() relator = mock_user.make_relator() mock_relatorio = mock.MockRelatorio() relatorio_data = mock_relatorio.make_relatorio() relatorio = mock_relatorio.save_relatorio(relatorio_data) mock_rds4 = mock.MockParecer() data = mock_rds4.make_rds4(relatorio=relatorio, relator=relator) Rds4.objects.create(**data) self.assertTrue(Rds4.objects.exists())
def setUp(self): mock_user = mock.MockUser() relator = mock_user.make_relator() self.client.force_login(relator) mock_relatorio = mock.MockRelatorio() relatorio_data = mock_relatorio.make_relatorio() relatorio = mock_relatorio.save_relatorio(relatorio_data) mock_rds3 = mock.MockParecer() rds3_data = mock_rds3.make_rds3(relatorio=relatorio, relator=relator) self.resp = self.client.post( r('parecer:parecer_rds3_new', slug=str(relatorio.uuid)), rds3_data)
def test_persist_rds3(self): """It must persist rds3 data""" mock_user = mock.MockUser() relator = mock_user.make_relator() mock_relatorio = mock.MockRelatorio() relatorio_data = mock_relatorio.make_relatorio() relatorio = mock_relatorio.save_relatorio(relatorio_data) mock_rds3 = mock.MockParecer() rds3_data = mock_rds3.make_rds3(relator=relator, relatorio=relatorio) Rds3.objects.create(**rds3_data) self.assertTrue(Rds3.objects.exists())
def test_rds2_created(self): """Rds2 must be created""" mock_user = mock.MockUser() relator = mock_user.make_relator() mock_relatorio = mock.MockRelatorio() relatorio_data = mock_relatorio.make_relatorio() relatorio = mock_relatorio.save_relatorio(relatorio_data) mock_rds2 = mock.MockParecer() rds2_data = mock_rds2.make_rds2(relator=relator, relatorio=relatorio) mock_rds2.save_rds2(rds2_data) self.assertTrue(Rds2.objects.exists())
def make_parecer(self): mock_user = mock.MockUser() relator = mock_user.make_relator() mock_relatorio = mock.MockRelatorio() relatorio_data = mock_relatorio.make_relatorio() relatorio = mock_relatorio.save_relatorio(relatorio_data) data = { 'desempenho': 'desempenho', 'revisao': 'revisao', 'definicao': 'definicao', 'plano': 'plano', 'resultados': 'resultados', 'atividades': 'atividades', 'relator': relator, 'relatorio': relatorio } return Rds1.objects.create(**data)
def test_created(self): mock_user = mock.MockUser() relator = mock_user.make_relator() mock_relatorio = mock.MockRelatorio() relatorio_data = mock_relatorio.make_relatorio() relatorio = mock_relatorio.save_relatorio(relatorio_data) data = { 'desempenho': 'desempenho', 'revisao': 'revisao', 'definicao': 'definicao', 'plano': 'plano', 'resultados': 'resultados', 'atividades': 'atividades', 'relator': relator, 'relatorio': relatorio } Rds1.objects.create(**data) self.assertTrue(Rds1.objects.exists())