--- a/tests/test_models.py Thu Jul 21 23:33:53 2016 +0800
+++ b/tests/test_models.py Thu Jul 21 23:35:01 2016 +0800
from datetime import datetime, timedelta
+from candolint import adapters
from candolint.models import database, Project, Change, Check
change = Change.get(id=change.id)
assert change.rev is None
assert change.id == old_id
+ project = Project(domain='bitbucket.org', name='obviously-from-bitbucket')
+ assert isinstance(project.get_adapter(), adapters.BitbucketAdapter)
+ project = Project(domain='github.com', name='obviously-from-github')
+ assert isinstance(project.get_adapter(), adapters.GithubAdapter)
+ project = Project(domain='example.com', name='fallback')
+ assert isinstance(project.get_adapter(), adapters.HostingAdapter)