示例#1
0
    def setUp(self):
        super().setUp()
        metrics = base.RequirementFactory.create_metrics(self.creator)
        self.requirement = base.RequirementFactory(created_by=self.creator,
                                                   **metrics)
        self.product = base.ProductFactory()
        level_of_definition = base.DefinitionLevelFactory()
        self.relevance = base.RelevanceFactory()
        criticality = base.CriticalityFactory()
        barriers = [base.BarrierFactory(), base.BarrierFactory()]

        self._DATA = {
            'note': 'test note',
            'requirement': self.requirement.pk,
            'product': self.product.pk,
            'level_of_definition': level_of_definition.pk,
            'relevance': self.relevance.pk,
            'criticality': criticality.pk,
            'barriers': [barrier.pk for barrier in barriers]
        }
        user = base.UserFactory(username='******')
        self.client.force_login(user)
示例#2
0
    def setUp(self):
        super().setUp()
        metrics = base.RequirementFactory.create_metrics(self.creator)
        self.requirement = base.RequirementFactory(created_by=self.creator,
                                                   **metrics)
        self.product = base.ProductFactory()
        level_of_definition = base.DefinitionLevelFactory()
        self.relevance = base.RelevanceFactory()
        criticality = base.CriticalityFactory()
        barriers = [base.BarrierFactory(), base.BarrierFactory()]

        self._DATA = {
            "note": "test note",
            "requirement": self.requirement.pk,
            "product": self.product.pk,
            "level_of_definition": level_of_definition.pk,
            "relevance": self.relevance.pk,
            "criticality": criticality.pk,
            "barriers": [barrier.pk for barrier in barriers],
        }
        user = base.UserFactory(username="******")
        self.client.force_login(user)
示例#3
0
 def test_help_get(self):
     base.UpdateFrequencyFactory()
     self.client.force_login(self.creator)
     base.BarrierFactory()
     resp = self.client.get(reverse("help"))
     self.assertEqual(resp.status_code, 200)