Example #1
0
class TestyDict:
    def setup_method(self, method):
        self.dict = YahooDict()

    def teardown_method(self, method):
        del self.dict

    def test__get_url(self):
        url = 'https://tw.dictionary.search.yahoo.com/search?p=test'
        assert url == self.dict._get_url('test')
Example #2
0
class TestyDict:
    def setup_method(self, method):
        self.dict = YahooDict(get_args())

    def teardown_method(self, method):
        del self.dict

    def test__get_url(self):
        url = 'https://tw.dictionary.search.yahoo.com/search?p=test'
        assert url == self.dict._get_url('test')
Example #3
0
 def setup_class(cls):
     cls.dict = YahooDict(get_args())
     cls.words = ['style', 'metadata', 'apples', 'google', 'hold on']
     cls.records = [cls.dict.query(word) for word in cls.words]
Example #4
0
 def setup_class(cls):
     cls.dict = YahooDict(get_args())
     cls.word = 'style'
     cls.record = cls.dict.query(cls.word)
Example #5
0
 def setup_method(self, method):
     self.dict = YahooDict()
Example #6
0
 def setup_method(self, method):
     self.dict = YahooDict(get_args())