(self)
| 7 | |
| 8 | @property |
| 9 | def company(self): |
| 10 | comp = None |
| 11 | if str(self.card_no).startswith("4"): |
| 12 | comp = "Visa Card" |
| 13 | elif str(self.card_no).startswith( |
| 14 | ( |
| 15 | "50", |
| 16 | "67", |
| 17 | "58", |
| 18 | "63", |
| 19 | ) |
| 20 | ): |
| 21 | comp = "Maestro Card" |
| 22 | elif str(self.card_no).startswith("5"): |
| 23 | comp = "Master Card" |
| 24 | elif str(self.card_no).startswith("37"): |
| 25 | comp = "American Express Card" |
| 26 | elif str(self.card_no).startswith("62"): |
| 27 | comp = "Unionpay Card" |
| 28 | elif str(self.card_no).startswith("6"): |
| 29 | comp = "Discover Card" |
| 30 | elif str(self.card_no).startswith("35"): |
| 31 | comp = "JCB Card" |
| 32 | elif str(self.card_no).startswith("7"): |
| 33 | comp = "Gasoline Card" |
| 34 | |
| 35 | return "Company : " + comp |
| 36 | |
| 37 | def first_check(self): |
| 38 | if 13 <= len(self.card_no) <= 19: |
nothing calls this directly
no outgoing calls
no test coverage detected