Exemplo n.º 1
0
    def test_access_map_acesses_invalid_date(self):
        sample_line = [
            '20X5-05-27T06:29:29.689+00:00', '10.1590/S1519-566X2004000500001',
            '1519-566X', 'gmail.com', 'Seoul National University',
            'Postdoctoral Fellow', '9', '', '', 'web', '147.46.228.216',
            'Republic of Korea', '1', ''
        ]

        with self.assertRaises(ValueError):
            am = readcube.AccessMap(sample_line)
Exemplo n.º 2
0
    def test_access_map_acesses_user_institution(self):
        sample_line = [
            '2015-05-27T06:29:29.689+00:00', '10.1590/S1519-566X2004000500001',
            '1519-566X', 'gmail.com', 'Seoul National University',
            'Postdoctoral Fellow', '9', '', '', 'web', '147.46.228.216',
            'Republic of Korea', '1', ''
        ]

        am = readcube.AccessMap(sample_line)

        self.assertEqual(am.user_institution, 'Seoul National University')
Exemplo n.º 3
0
    def test_instantiating_invalid_len(self):
        sample_line = []

        with self.assertRaises(ValueError):
            am = readcube.AccessMap(sample_line)