Example #1
0
 def lines(self):
     try:
         csv = util.urlopen_lines(self.source.url)
         return udr.UnicodeDictReader(csv)
     except udr.EmptyCSVError as e:
         self.log_exception(e)
         return ()
Example #2
0
 def lines(self):
     try:
         csv = util.urlopen_lines(self.source.url)
         return udr.UnicodeDictReader(csv)
     except udr.EmptyCSVError as e:
         self.log_exception(e)
         return ()
Example #3
0
def test_urlopen_lines(urlopen_mock):
    urlopen_mock.return_value = StringIO("line one\nline two\r\nline three")

    lines = [line for line in util.urlopen_lines("http://none")]

    h.assert_equal(lines, ["line one\n", "line two\n", "line three"])
Example #4
0
def test_urlopen_lines(urlopen_mock):
    urlopen_mock.return_value = StringIO("line one\nline two\r\nline three")

    lines = [line for line in util.urlopen_lines("http://none")]

    h.assert_equal(lines, ["line one\n", "line two\n", "line three"])