Esempio n. 1
0
    def test_balance_due_getter_setter(self):
        case_args = [("John Doe", "1990"), "", "", ("1/1/2019", ""), ("", ""), ""]

        case_1 = CaseCreator.create(*case_args, "123.45")  # type: ignore
        assert case_1.get_balance_due() == 123.45

        case_2 = CaseCreator.create(*case_args, "2,345.67")  # type: ignore
        assert case_2.get_balance_due() == 2345.67

        case_3 = CaseCreator.create(*case_args, "0")  # type: ignore
        assert case_3.get_balance_due() == 0
Esempio n. 2
0
 def __record_case(self):
     self.cases.append(
         CaseCreator.create(
             self.info,
             self.case_number,
             self.citation_number,
             self.date_location,
             self.type_status,
             self.case_detail_link,
         ))
 def __record_case(self):
     self.cases.append(
         CaseCreator.create(
             self.info,
             self.case_number,
             "",  # district_attorney_number
             "",  # sid
             self.citation_number,
             self.date_location,
             self.type_status,
             self.case_detail_link,
         ))
Esempio n. 4
0
 def create(
     info=["John Doe", "1990"],
     case_number="1",
     citation_number=None,
     date_location=["1/1/1995", "Multnomah"],
     type_status=["Offense Misdemeanor", "Closed"],
     case_detail_link="?404",
     balance="0",
 ) -> CaseSummary:
     return CaseCreator.create(info, case_number, citation_number,
                               date_location, type_status, case_detail_link,
                               balance)
Esempio n. 5
0
class CaseFactory:
    @staticmethod
    def create(
        info=["John Doe", "1990"],
        case_number="1",
        citation_number=None,
        date_location=["1/1/1995", "Multnomah"],
        type_status=["Offense Misdemeanor", "Closed"],
        charges=[],
        case_detail_link="?404",
        balance="0",
    ) -> Case:
        case = CaseCreator.create(
            info, case_number, citation_number, date_location, type_status, charges, case_detail_link, balance
        )
        return case