Exemplo n.º 1
0
 def setUp(self):
     data = json.dumps({
         'title': 'title',
         'snippet': 'test code here',
         'language': 'python'
     })
     self.sp = SendPaste(data=data)
Exemplo n.º 2
0
class TestSendPaste(unittest.TestCase):
    def setUp(self):
        data = json.dumps({
                'title': 'title',
                'snippet': 'test code here',
                'language': 'python'
            })
        self.sp = SendPaste(data=data)

    def test_send_paste(self):
        self.assertIsInstance(self.sp.send_paste(), dict, \
            msg="Connection is down")
        self.assertEqual(True, self.sp.send_paste()['ok'])
        self.assertIn('https://friendpaste.com', self.sp.send_paste()['url'])
Exemplo n.º 3
0
class TestSendPaste(unittest.TestCase):
    def setUp(self):
        data = json.dumps({
            'title': 'title',
            'snippet': 'test code here',
            'language': 'python'
        })
        self.sp = SendPaste(data=data)

    def test_send_paste(self):
        self.assertIsInstance(self.sp.send_paste(), dict, \
            msg="Connection is down")
        self.assertEqual(True, self.sp.send_paste()['ok'])
        self.assertIn('https://friendpaste.com', self.sp.send_paste()['url'])
Exemplo n.º 4
0
 def setUp(self):
     data = json.dumps({
             'title': 'title',
             'snippet': 'test code here',
             'language': 'python'
         })
     self.sp = SendPaste(data=data)