示例#1
0
 def test_resumed_file(self):
     f = StringIO()
     writer = csv_contact_writer(f, True)
     writer({"msisdn": "1234"})
     writer({"msisdn": "5678"})
     self.assertEqual(f.getvalue(), "1234\r\n5678\r\n")
示例#2
0
 def test_resumed_file(self):
     f = StringIO()
     writer = csv_contact_writer(f, True)
     writer({"msisdn": "1234"})
     writer({"msisdn": "5678"})
     self.assertEqual(f.getvalue(), "1234\r\n5678\r\n")
示例#3
0
 def test_new_file(self):
     f = StringIO()
     writer = csv_contact_writer(f, False)
     writer({"msisdn": "1234"})
     writer({"msisdn": "5678"})
     self.assertEqual(f.getvalue(), "msisdn\r\n1234\r\n5678\r\n")
示例#4
0
 def test_new_file(self):
     f = StringIO()
     writer = csv_contact_writer(f, False)
     writer({"msisdn": "1234"})
     writer({"msisdn": "5678"})
     self.assertEqual(f.getvalue(), "msisdn\r\n1234\r\n5678\r\n")