예제 #1
0
    def test_cli_upload_all(self):
        mock_upload_all = MagicMock()
        with patch("ooni.scripts.oonireport.upload_all", mock_upload_all):
            from ooni.scripts.oonireport import oonireport

            oonireport(_args=["upload"])
            self.assertTrue(mock_upload_all.called)
예제 #2
0
    def test_cli_upload(self):
        mock_upload = MagicMock()
        with patch("ooni.scripts.oonireport.upload", mock_upload):
            from ooni.scripts.oonireport import oonireport

            oonireport(_args=["upload", "dummy.yaml"])
            self.assertTrue(mock_upload.called)
예제 #3
0
    def test_cli_status(self):
        mock_status = MagicMock()
        with patch("ooni.scripts.oonireport.status", mock_status):
            from ooni.scripts.oonireport import oonireport

            oonireport(_args=["status"])
            self.assertTrue(mock_status.called)
예제 #4
0
 def test_cli_upload_all(self):
     mock_upload_all = MagicMock()
     with patch('ooni.scripts.oonireport.upload_all', mock_upload_all):
         from ooni.scripts.oonireport import oonireport
         oonireport(_args=["upload"])
         self.assertTrue(mock_upload_all.called)
예제 #5
0
 def test_cli_upload(self):
     mock_upload = MagicMock()
     with patch('ooni.scripts.oonireport.upload', mock_upload):
         from ooni.scripts.oonireport import oonireport
         oonireport(_args=["upload", "dummy.yaml"])
         self.assertTrue(mock_upload.called)
예제 #6
0
 def test_cli_status(self):
     mock_status = MagicMock()
     with patch('ooni.scripts.oonireport.status', mock_status):
         from ooni.scripts.oonireport import oonireport
         oonireport(_args=["status"])
         self.assertTrue(mock_status.called)