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)
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)
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)
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)
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)
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)