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 flask_restful import abort, fields, marshal_with, Resource, reqparse | |
| from flask import jsonify | |
| from projects.blog.models import Posts | |
| # reqparse | |
| posts_parser = reqparse.RequestParser() | |
| posts_parser.add_argument('title', type=str, help="Title is Required", required=True) | |
| posts_parser.add_argument('contents', type=str, help='Contents is Required', required=True) | |
| posts_update = reqparse.RequestParser() |
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 flask import Blueprint | |
| from flask_restful import Api | |
| # API Blueprint | |
| from projects.blog.api.views import PostListView, PostDetailView | |
| blog_api_blueprint = Blueprint('blog', __name__, template_folder='templates', static_folder='static') | |
| blog_api = Api(blog_api_blueprint) | |
| # routes |
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
| import os | |
| import json | |
| #print(current_dir) | |
| def generate_assets(assets_path: str, output_path: str, filename: str): | |
| path_result: list = [] |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| def create_proxyauth_extension(proxy_host, proxy_port, |
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
| . | |
| ├── config | |
| │ ├── asgi.py | |
| │ ├── __init__.py | |
| │ ├── __pycache__ | |
| │ │ ├── __init__.cpython-39.pyc | |
| │ │ ├── settings.cpython-39.pyc | |
| │ │ ├── urls.cpython-39.pyc | |
| │ │ └── wsgi.cpython-39.pyc | |
| │ ├── settings.py |
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
| import os | |
| import unittest | |
| from selenium import webdriver | |
| from webdriver_manager.chrome import ChromeDriverManager | |
| class NewVisitorTest(unittest.TestCase): | |
| def setUp(self): | |
| # creating temporary directory |
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 setUp(self): | |
| # creating temporary directory | |
| try: | |
| os.mkdir('temp') | |
| except FileExistsError: | |
| pass | |
| # creating directory to Append Driver | |
| try: | |
| os.mkdir('temp/driver') |
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 tearDown(self): | |
| self.driver.quit() |
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 test_start_web(self): | |
| url: str = 'http://127.0.0.1:8000/' | |
| self.driver.get(url=url) | |
| self.assertIn('Todo', self.driver.title) | |
| self.fail('test Finished') |
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
| class MyApp extends StatelessWidget { | |
| const MyApp({Key? key}) : super(key: key); | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| debugShowCheckedModeBanner: false, | |
| home: Home(), | |
| ); | |
| } |