def test_tosec_name(self): g = Game(name='Test') tosec_name = g.getTOSECName() self.assertTrue(tosec_name == 'Test (19xx)(-)') g.publisher = 'Something software' tosec_name = g.getTOSECName() self.assertTrue(tosec_name == 'Test (19xx)(Something software)') g.year = 1999 tosec_name = g.getTOSECName() self.assertTrue(tosec_name == 'Test (1999)(Something software)') g.setPublisher('16/48k Tape Magazine') self.assertEqual(g.getTOSECName(), 'Test (1999)(16-48k Tape Magazine)') g.setPublisher('Test [1]') self.assertEqual(g.getTOSECName(), 'Test (1999)(Test)') g.setPublisher('Test [test]') self.assertEqual(g.getTOSECName(), 'Test (1999)(Test)')
def test_colon_in_name(self): g = Game('Ace 2: Combat') self.assertEqual(g.getTOSECName(), 'Ace 2 - Combat (19xx)(-)')