Example #1
0
    def test_make_fields_from_content_questions_with_boolean(self):
        locations_question = self.content_manifest.get_question(
            "accessibleApplicationsOutcomes")

        assert csv_helpers.make_fields_from_content_questions(
            [locations_question], self.record) == [
                ('accessibleApplicationsOutcomes', 'True'),
            ]
 def inner(record):
     row = [
         ("supplier_id", record["supplier_id"]),
         ("supplier_name", record['supplier']['name']),
         ("supplier_declaration_name", record['declaration'].get('supplierRegisteredName', '')),
         ("status", "PASSED" if record["onFramework"] else "FAILED"),
     ]
     return row + make_fields_from_content_questions(capabilities + locations, record)
 def inner(record):
     row = [
         ("supplier_id", record["supplier_id"]),
         ("supplier_name", record["supplier"]["name"]),
         ("supplier_declaration_name",
          record["declaration"].get("supplierRegisteredName", "")),
         ("status", "PASSED" if record["onFramework"] else "FAILED"),
     ]
     return row + make_fields_from_content_questions(questions, record)
Example #4
0
 def test_make_fields_from_content_questions_with_checkbox_questions(self):
     locations_question = self.content_manifest.get_question("locations")
     assert csv_helpers.make_fields_from_content_questions(
         [locations_question],
         self.record) == [('locations Offsite', 1),
                          ('locations Scotland', 1),
                          ('locations North East England', 1),
                          ('locations North West England', 0),
                          ('locations Yorkshire and the Humber', 0),
                          ('locations East Midlands', 0),
                          ('locations West Midlands', 0),
                          ('locations East of England', 0),
                          ('locations Wales', 0), ('locations London', 0),
                          ('locations South East England', 0),
                          ('locations South West England', 0),
                          ('locations Northern Ireland', 0)]