Example #1
0
    def test_write_profile_default_naming(self):
        self.setUp()
        folder_path = path.join(path.dirname(path.abspath(__file__)),
                                'resources', 'profile', 'folder')

        profile=Profile("New profile")
        profile.path=self.conf.get_free_profile()
        self.conf.add_profile(profile)
        self.conf.update_profiles()
        path.isfile(path.join(folder_path,"profile1.ini"))
        os.remove(path.join(folder_path,"profile1.ini"))
Example #2
0
    def no_test_write_profile_default_naming(self):
        self.setUp()
        folder_path = path.join(path.dirname(path.abspath(__file__)),
                                'resources', 'profile', 'folder')

        profile=Profile("New profile")
        profile.path=self.conf.get_free_profile()
        self.conf.add_profile(profile)
        self.conf.update_profiles()
        path.isfile(path.join(folder_path,"profile1.ini"))
        os.remove(path.join(folder_path,"profile1.ini"))
Example #3
0
    def no_test_delete_profile(self):
        self.setUp()
        folder_path = path.join(path.dirname(path.abspath(__file__)),
                                'resources', 'profile', 'folder')

        profile=Profile("New")
        profile.path=self.conf.get_free_profile()
        self.conf.add_profile(profile)
        self.conf.update_profiles()
        profile.to_delete = True
        self.conf.update_profiles()
        self.assertEqual(path.isfile(path.join(folder_path,"profile1.ini")),False)
        #os.remove(path.join(folder_path,"profile1.ini"))
        return True
Example #4
0
    def test_delete_profile(self):
        self.setUp()
        folder_path = path.join(path.dirname(path.abspath(__file__)),
                                'resources', 'profile', 'folder')

        profile=Profile("New")
        profile.path=self.conf.get_free_profile()
        self.conf.add_profile(profile)
        self.conf.update_profiles()
        profile.to_delete = True
        self.conf.update_profiles()
        self.assertEqual(path.isfile(path.join(folder_path,"profile1.ini")),False)
        #os.remove(path.join(folder_path,"profile1.ini"))
        return True
Example #5
0
    def no_test_write_profile(self):
        self.setUp()
        folder_path = path.join(path.dirname(path.abspath(__file__)), 
                                'resources', 'profile', 'folder')

        profile=Profile("New profile", path.join(folder_path,"profile11.ini"))
    
        self.conf.add_profile(profile)
        self.conf.update_profiles()
        path.isfile(path.join(folder_path,"profile11.ini"))
        os.remove(path.join(folder_path,"profile11.ini"))
Example #6
0
    def test_add_track_to_profile(self):
        profile = Profile()
        self.assertEqual(0, len(profile.tracks))

        t1 = profile.new_track({})
        self.assertEqual(1, len(profile.tracks))

        t2 = Track()
        profile.add_track(t2)
        self.assertEqual(2, len(profile.tracks))

        profile.remove_track(t2)
        self.assertEqual(1, len(profile.tracks))
Example #7
0
    def test_add_track_to_profile(self):
        profile = Profile()
        self.assertEqual(0, len(profile.tracks))
        
        t1 = profile.new_track({})
        self.assertEqual(1, len(profile.tracks))
        
        t2 = Track()
        profile.add_track(t2)
        self.assertEqual(2, len(profile.tracks))

        profile.remove_track(t2)
        self.assertEqual(1, len(profile.tracks))
Example #8
0
    def test_init_profile(self):
        profile = Profile()
        self.assertEqual(profile.name, 'New Profile')

        profile = Profile('test')
        self.assertEqual(profile.name, 'test')
Example #9
0
 def test_create_and_add_profile(self):
     self.setUp()
     profile=Profile("New")
     self.conf.add_profile(profile)
     self.assertEqual("New" in self.conf.get_profiles(),True)    
Example #10
0
 def test_create_profile(self):
     profile=Profile("New profile")
     self.assertEqual(profile.name, "New profile")    
Example #11
0
 def no_test_create_and_add_profile(self):
     self.setUp()
     profile=Profile("New")
     self.conf.add_profile(profile)
     self.assertEqual(self.conf.get_profiles().has_key("New"),True)