예제 #1
0
파일: tests.py 프로젝트: aebhughes/cititec
 def test_file_write(self):
     t = [(123,'Joking','Right Said Fred'),
          (456,'Sugar Man','Rodregus')]
     tt.write_existing(t, 'testwrite')
     t = tt.get_existing('testwrite')
     self.assertEqual(len(t), 2)        
     rec = t[0]
     for ndx, field in enumerate([123,'Joking','Right Said Fred']):
         self.assertEqual(rec[ndx], field)        
예제 #2
0
파일: tests.py 프로젝트: aebhughes/cititec
 def test_get_recent_tracks(self):
     tt.get_recent_tracks('aebhughes')
     t = tt.get_existing('aebhughes')
     self.assertGreater(len(t), 0)
예제 #3
0
파일: tests.py 프로젝트: aebhughes/cititec
 def test_file_read(self):
     t = tt.get_existing('testread')
     self.assertEqual(len(t), 3)
예제 #4
0
파일: tests.py 프로젝트: aebhughes/cititec
 def test_file_create(self):
     t = tt.get_existing('testcreate')
     self.assertEqual(t, [])