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")
Beispiel #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")
 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")
Beispiel #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")