예제 #1
0
 def test_error_keyerror(self):
     self.assertEqual(get_boards(0), {})
예제 #2
0
 def test_get_boards_just_code(self):
     self.assertEqual(get_boards(self.context.text, True)['Random'], 'b')
예제 #3
0
 def test_get_boards_instance_len(self):
     self.assertGreaterEqual(len(get_boards(self.context.text)), 70)
예제 #4
0
 def test_get_boards_none(self):
     self.assertIsInstance(get_boards(''), dict)
예제 #5
0
파일: app.py 프로젝트: thiagolopes/py4chan
def boards():
    boards = py4chan.get_boards(context_chan_text, just_code=True)
    return render_template('index.html', boards_list=boards)
예제 #6
0
 def test_get_boards_instance(self):
     self.assertIsInstance(get_boards(self.context.text), dict)
예제 #7
0
 def test_get_boards_just_code(self):
     self.assertEqual(get_boards(self.context.text, True)['Random'], 'b')
예제 #8
0
 def test_error_keyerror(self):
     self.assertEqual(get_boards(0), {})
예제 #9
0
 def test_get_boards_none(self):
     self.assertIsInstance(get_boards(''), dict)
예제 #10
0
 def test_get_boards_instance_len(self):
     self.assertGreaterEqual(len(get_boards(self.context.text)), 70)
예제 #11
0
 def test_get_boards_instance(self):
     self.assertIsInstance(get_boards(self.context.text), dict)