Пример #1
0
 def test_validate_valid(self):
     tender = Tender(
         {"title": "whatever", "mainProcurementCategory": "goods", "milestones": [copy.deepcopy(self.milestones)]}
     )
     tender.validate()
     data = tender.serialize("embedded")
     self.assertIn("mainProcurementCategory", data)
     self.assertIn(data["mainProcurementCategory"], "goods")
 def test_validate_empty(self):
     tender = Tender({"title": "whatever"})
     tender.validate()
     data = tender.serialize("embedded")
     self.assertNotIn("mainProcurementCategory", data)