This repository has been archived on 2025-11-04. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
csmb-housewars/housewars/tests/utils/test_load_pdf.py

21 lines
578 B
Python

from django.test import TestCase
import io
from housewars.utils import load_pdf
from housewars.models import House
class UnpackValuesTest(TestCase):
def setUp(self):
House.objects.create(name="Hawk")
House.objects.create(name="Snowy")
self.test_queryset = House.objects.all()
def test_matching_object_instance(self):
"""Correctly unpacks the headers into the first index"""
headers = [field.name for field in House._meta.fields]
self.assertIsInstance(
load_pdf(self.test_queryset, headers), io.BytesIO)