from django.test import TestCase

class TestRepoHandlers(TestCase):
    def test_repo_registry(self):
        from package.handlers import get_repo, supported_repos
        g = get_repo("github")
        self.assertEqual(g.title, "Github")
        self.assertEqual(g.url, "https://github.com")

        self.assertTrue("github" in supported_repos())

from django.test import TestCase

class TestRepoHandlers(TestCase):
    def test_repo_registry(self):
        from package.handlers import get_repo, supported_repos
        g = get_repo("github")
        self.assertEqual(g.title, "Github")
        self.assertEqual(g.url, "https://github.com")

        self.assertTrue("github" in supported_repos())

        self.assertRaises(ImportError, lambda: get_repo("xyzzy"))

Test what get_repo() does for unsupported repos
Test what get_repo() does for unsupported repos

  from django.test import TestCase
  
  class TestRepoHandlers(TestCase):
      def test_repo_registry(self):
          from package.handlers import get_repo, supported_repos
          g = get_repo("github")
          self.assertEqual(g.title, "Github")
          self.assertEqual(g.url, "https://github.com")
  
          self.assertTrue("github" in supported_repos())
  
+         self.assertRaises(ImportError, lambda: get_repo("xyzzy"))
+ 
Test what get_repo() does for unsupported repos
## Code Before:
from django.test import TestCase

class TestRepoHandlers(TestCase):
    def test_repo_registry(self):
        from package.handlers import get_repo, supported_repos
        g = get_repo("github")
        self.assertEqual(g.title, "Github")
        self.assertEqual(g.url, "https://github.com")

        self.assertTrue("github" in supported_repos())

## Instruction:
Test what get_repo() does for unsupported repos
## Code After:
from django.test import TestCase

class TestRepoHandlers(TestCase):
    def test_repo_registry(self):
        from package.handlers import get_repo, supported_repos
        g = get_repo("github")
        self.assertEqual(g.title, "Github")
        self.assertEqual(g.url, "https://github.com")

        self.assertTrue("github" in supported_repos())

        self.assertRaises(ImportError, lambda: get_repo("xyzzy"))
