Beispiel #1
0
    def test_loadConfig_6(self):

        f = open('config.ini','w+')
        f.write( "[DEFAULT]\nfrequencyPictures = 15\n")
        f.close()

        self.assertEqual(loadConfig(self.logger), (15, '0', 'out'))
Beispiel #2
0
    def test_loadConfig_7(self):

        f = open('config.ini','w+')
        f.write( "[DEFAULT]\nfloucaptFolder = folder\n")
        f.close()

        self.assertEqual(loadConfig(self.logger), (10, '0', 'folder'))
Beispiel #3
0
    def test_loadConfig_4(self):

        f = open('config.ini','w+')
        f.write( '[DEFAULT]\nlink = 5\n' )
        f.close()

        self.assertEqual(loadConfig(self.logger), (10, '5', 'out'))
Beispiel #4
0
    def test_loadConfig_5(self):

        f = open('config.ini','w+')
        f.write( "[DEFAULT]\nlink = http://www.google.fr\n" )
        f.close()

        self.assertEqual(loadConfig(self.logger), (10, 'http://www.google.fr', 'out'))
Beispiel #5
0
    def test_loadConfig_7(self):

        f = open('config.ini', 'w+')
        f.write("[DEFAULT]\nfloucaptFolder = folder\n")
        f.close()

        self.assertEqual(loadConfig(self.logger), (10, '0', 'folder'))
Beispiel #6
0
    def test_loadConfig_3(self):

        f = open('config.ini','w+')
        f.write( "" )
        f.close()

        self.assertEqual(loadConfig(self.logger), (10, '0', 'out'))
Beispiel #7
0
    def test_loadConfig_6(self):

        f = open('config.ini', 'w+')
        f.write("[DEFAULT]\nfrequencyPictures = 15\n")
        f.close()

        self.assertEqual(loadConfig(self.logger), (15, '0', 'out'))
Beispiel #8
0
    def test_loadConfig_4(self):

        f = open('config.ini', 'w+')
        f.write('[DEFAULT]\nlink = 5\n')
        f.close()

        self.assertEqual(loadConfig(self.logger), (10, '5', 'out'))
Beispiel #9
0
    def test_loadConfig_3(self):

        f = open('config.ini', 'w+')
        f.write("")
        f.close()

        self.assertEqual(loadConfig(self.logger), (10, '0', 'out'))
Beispiel #10
0
    def test_loadConfig_5(self):

        f = open('config.ini', 'w+')
        f.write("[DEFAULT]\nlink = http://www.google.fr\n")
        f.close()

        self.assertEqual(loadConfig(self.logger),
                         (10, 'http://www.google.fr', 'out'))
Beispiel #11
0
    def test_loadConfig_all(self):

        f = open('config.ini', 'w+')
        f.write("[DEFAULT]\n" + "frequencyPictures = 15\n" +
                "link = http://www.google.fr\n" + "floucaptFolder = folder\n")
        f.close()

        self.assertEqual(loadConfig(self.logger),
                         (15, 'http://www.google.fr', 'folder'))
Beispiel #12
0
    def test_loadConfig_all(self):

        f = open('config.ini','w+')
        f.write( "[DEFAULT]\n"
               + "frequencyPictures = 15\n"
               + "link = http://www.google.fr\n"
               + "floucaptFolder = folder\n")
        f.close()

        self.assertEqual(loadConfig(self.logger), (15, 'http://www.google.fr', 'folder'))
Beispiel #13
0
    def test_loadConfig_2(self):

        os.remove('config.ini')

        self.assertEqual(loadConfig(self.logger), (10, '0', 'out'))
Beispiel #14
0
    def test_loadConfig_2(self):

        os.remove('config.ini')

        self.assertEqual(loadConfig(self.logger), (10, '0', 'out'))