Skip to content

Commit

Permalink
uncomment test and fix import/name errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoney committed Feb 22, 2022
1 parent 746cd47 commit 032c8b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions package/tests/test_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
from package.repos import get_repo_for_repo_url
from package.repos.base_handler import BaseHandler
from package.repos.unsupported import UnsupportedHandler
from package.models import Package, Category
from package.repos.bitbucket import BitbucketHandler
from package.models import Package, Category, Commit


class BaseBase(TestCase):
Expand Down Expand Up @@ -173,7 +174,6 @@ def test_get_repo_for_repo_url(self):
)


"""
class TestBitbucketRepo(TestBaseHandler):
def setUp(self):
super(TestBitbucketRepo, self).setUp()
Expand All @@ -183,21 +183,21 @@ def setUp(self):
repo_url="https://bitbucket.org/django/django",
category=self.category
)
self.bitbucket_handler = BitbucketHandler()

def test_fetch_commits(self):
self.assertEqual(Commit.objects.count(), 0)
bitbucket_handler.fetch_commits(self.package)
self.bitbucket_handler.fetch_commits(self.package)
self.assertNotEqual(Commit.objects.count(), 0)

def test_fetch_metadata(self):
package = bitbucket_handler.fetch_metadata(self.package)
package = self.bitbucket_handler.fetch_metadata(self.package)
self.assertTrue(
package.repo_description.startswith("Official clone of the Subversion repo")
)
self.assertTrue(package.repo_watchers > 0)
self.assertTrue(package.repo_forks > 0)
self.assertEquals(package.participants, "django")
"""


class TestGithubRepo(TestBaseHandler):
Expand Down

0 comments on commit 032c8b6

Please sign in to comment.