This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.common.by import By | |
driver_exe = 'chromedriver' | |
options = Options() | |
options.add_argument("--headless") | |
options.add_argument("--start-maximized") #open Browser in maximized mode | |
options.add_argument("--no-sandbox") #bypass OS security model |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
services: | |
rabbitmq: | |
image: 'rabbitmq:3-management' | |
ports: | |
- '5672:5672' | |
- '15672:15672' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN apt-get update -y && \ | |
apt-get install -y python3-pip python3-dev | |
RUN pip3 install pika | |
WORKDIR /app | |
COPY . /app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:18.04 | |
RUN apt-get update -y && \ | |
apt-get install -y python3-pip python3-dev | |
COPY ./requirements.txt /app/requirements.txt | |
WORKDIR /app | |
RUN pip3 install pika && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def download_item(): | |
uri_path = "/sf/v3/Items(%s)/Download" % (item_id) | |
http = httplib.HTTPSConnection(self.get_hostname(token)) | |
http.request("GET", uri_path, headers=self.get_authorization_header(token)) | |
response = http.getresponse() | |
location = response.getheader("location") | |
if location: | |
urllib.request.urlretrieve(location, "/home/Downloads/item.zip") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_folder_with_query_parameters(self,token, item_id,folder_name): | |
uri_path = '/sf/v3/Users/AllSharedFolders' | |
headers = self.get_authorization_header(token) | |
http = httplib.HTTPSConnection(self.get_hostname(token)) | |
http.request('GET', uri_path, headers=headers) | |
response = http.getresponse() | |
if response.status == 200: | |
data = json.loads(response.read()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_sharefile_link(self): | |
self.create_user_sharelink() | |
config_obj = self.env['ir.config_parameter'] | |
parent_id = config_obj.sudo().get_param('sharefile.sharefile_parent_id') # for Odoo | |
parent_id = "123" | |
folder_name = "Test" | |
folder_desc = "Test desc" | |
hostname, username, password, client_id, client_secret = self.get_config_data() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def create_new_user_id(self,token,zone_id): | |
password = get_random_password_string(13) | |
self.email = "[email protected]" | |
self.firstname = "firstname" | |
self.lastname = "lastname" | |
self.company_name = "company_name" | |
userdata = { | |
"Email": self.email, | |
"FirstName":self.firstname, | |
"LastName":self.lastname, |
NewerOlder