def test_bitbucket(self): """Test the bitbucket updater""" updater = addon_updater.SingletonUpdater() updater.engine = "Bitbucket" updater.private_token = None updater.user = "******" updater.repo = "blender-addon-updater-bitbucket" updater.website = "https://bitbucket.org/TheDuckCow/blender-addon-updater-bitbucket" # Check rate limitations # https://confluence.atlassian.com/bitbucket/rate-limits-668173227.html self.run_engine_test(updater)
def test_gitlab(self): """Test the gitlab updater""" updater = addon_updater.SingletonUpdater() updater.engine = "GitLab" updater.private_token = None updater.user = "******" updater.repo = "3645616" updater.website = "https://gitlab.com/TheDuckCow/test-updater-gitlab" # Check rate limits # https://docs.gitlab.com/ee/api/README.html#rate-limits self.run_engine_test(updater)
def test_version_tuple_from_text(self): """Test tuple extraction examples""" updater = addon_updater.SingletonUpdater() updater.include_branches = False # otherwise could treat as branch name # structure of: input, expected test_cases = [["0.0.0", (0, 0, 0)], ["v0.0.0", (0, 0, 0)], ["v0.0", (0, 0)], ["v0.0 beta", (0, 0)], ["version 1,2,3 beta", (1, 2, 3)]] for case in test_cases: res = updater.version_tuple_from_text(case[0]) self.assertEqual(res, case[1])
def test_github(self): """Test the gitlab updater""" updater = addon_updater.SingletonUpdater() updater.engine = "Github" updater.private_token = None updater.user = "******" updater.repo = "blender-addon-updater" updater.website = "https://github.com/CGCookie/blender-addon-updater" # Check rate limitations (command will show if local limit reached) # curl "https://api.github.com/rate_limit" # More info: https://developer.github.com/v3/rate_limit/ self.run_engine_test(updater)
def test_reload_callbacl(self): """Test the reload function which disables and re-enables addon""" updater = addon_updater.SingletonUpdater() updater.auto_reload_post_update = True updater._addon_package = "blender-addon-updater-github" # test override updater.reload_addon() # assert no error