def test_get_variance_document_category_codes(self, test_client,
                                                  db_session, auth_headers):
        """Should return the correct number of records with a 200 response code"""

        get_resp = test_client.get(f'/variances/document-categories',
                                   headers=auth_headers['full_auth_header'])
        get_data = json.loads(get_resp.data.decode())
        assert get_resp.status_code == 200
        assert len(get_data['records']) == len(
            VarianceDocumentCategoryCode.active())
Ejemplo n.º 2
0
 def get(self):
     return VarianceDocumentCategoryCode.get_all()
Ejemplo n.º 3
0
def RandomVarianceDocumentCategoryCode():
    return random.choice([
        x.variance_document_category_code
        for x in VarianceDocumentCategoryCode.active()
    ])
Ejemplo n.º 4
0
 def get(self):
     return VarianceDocumentCategoryCode.active()