Пример #1
0
 def testParseOk(self):
     url = 'https://github.com/search?q=Tensorflow&type=Repositories'
     response = requests.get(url)
     self.soup = BeautifulSoup(response.text, "html.parser")
     strategy = Respositories()
     strategyType = Type(strategy)
     response =strategyType.search_params(response.text)
     self.assertEqual(len(response),10)
Пример #2
0
class GHTypes(ABC):
    """
    GitHub types to select
    """

    factory = {}
    factory["Repositories"] = Respositories()
    factory["Issues"] = Issues()
    factory["Wikis"] = Wikis()

    @classmethod
    def factory_method(self, gh_types):
        if gh_types in GHTypes.factory.keys():
            return GHTypes.factory[gh_types]
        else:
            return None
Пример #3
0
 def setUp(self) -> None:
     url = 'https://github.com/search?q=Tensorflow&type=Repositories'
     response = requests.get(url)
     self.soup = BeautifulSoup(response.text, "html.parser")
     self.repositories = Respositories()