Commit 421476d8 authored by skysky's avatar skysky

Add class user.

parent 46d1a054
Pipeline #4516 failed with stages
in 9 seconds
from app_web import app
if __name__ =='__main__':
app.run()
\ No newline at end of file
from flask import Flask
app = Flask(__name__)
from app_web import view
\ No newline at end of file
class User:
def __init__(self, n, e, p):
self.name = n
self.email = e
self.phone = p
from app_web.models.User import User
def test_user():
user = User("skysky","[email protected]","0905619093")
assert user.name == "skysky", "Error user name."
assert user.email == "[email protected]", "Error user E-mail."
assert user.phone == "0905619093", "Error user phone."
\ No newline at end of file
from flask import Flask
from app_web import app
@app.route('/')
def hello():
return 'Hello, World!'
\ No newline at end of file
def num(a, b):
return a + b
pytest
\ No newline at end of file
pytest
flask
\ No newline at end of file
from main import num
def test_num():
assert num(1,2) == 3
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment