

def test_set_number(self):
    num = '1234'
    self.card.set_number(num)
    self.assertEquals(num, self.card.number)
    self.assertEquals(num, self.card.last_four)
    num = '1'
    self.card.set_number(num)
    self.assertEquals(num, self.card.number)
    self.assertEquals(num, self.card.last_four)
    num = '11112222'
    self.card.set_number(num)
    self.assertEquals(num, self.card.number)
    self.assertEquals('2222', self.card.last_four)
    num = 'abc1X2X3xyz'
    self.card.set_number(num)
    self.assertEquals('123', self.card.number)
    self.assertEquals('123', self.card.last_four)
    num = 'foo_bar_baz'
    self.card.set_number(num)
    self.assertEquals('', self.card.number)
    self.assertEquals('', self.card.last_four)

dataset/ETHPy150Open shaunduncan/breezeminder/breezeminder/tests/models/test_card.py BreezeCardTestCase.test_set_number/original