Skip to content

Commit

Permalink
Merge branch 'master' into snyk-fix-9a0e34581271c3256edcb1968333111c
Browse files Browse the repository at this point in the history
  • Loading branch information
rofrano authored Dec 26, 2024
2 parents bdd80ff + 16b07bd commit a3c3482
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Run unit tests with nose
run: nosetests
env:
DATABASE_URI: "postgres://postgres:postgres@postgres:5432/testdb"
DATABASE_URI: "postgresql://postgres:postgres@postgres:5432/testdb"

- name: Upload code coverage
uses: codecov/codecov-action@v2
18 changes: 8 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Flask==1.0.2
Flask-API==1.0
Flask-WTF==0.14.2
Flask-SQLAlchemy==2.3.2
SQLAlchemy==1.2.18
Flask-Migrate==2.3.1
Flask==2.0.2
Flask-API
Flask-WTF==1.0.0
Flask-SQLAlchemy==2.5.1
SQLAlchemy==1.4.27
Flask-Migrate==3.1.0
# Uncomment next line to use MySQL
#PyMySQL==0.7.11
# PyMySQL==0.7.11
# Uncomment next line to use PostgreSQL
psycopg2-binary==2.8.4

Expand All @@ -14,12 +14,10 @@ gunicorn==20.1.0
honcho==1.1.0

# Testing dependencies
httpie==2.6.0
httpie==3.1.0
pylint==2.11.1
nose==1.3.7
pinocchio==0.4.3

# Code coverage
coverage==6.1.2
codecov==2.1.12
setuptools>=65.5.1 # not directly required, pinned by Snyk to avoid a vulnerability
2 changes: 1 addition & 1 deletion tests/test_pets.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from app.models import Pet, Category, DataValidationError

# DATABASE_URI = 'mysql+pymysql://root:passw0rd@localhost:3306/test'
DATABASE_URI = os.getenv('DATABASE_URI', "postgres://postgres:postgres@localhost:5432/postgres")
DATABASE_URI = os.getenv('DATABASE_URI', "postgresql://postgres:postgres@localhost:5432/postgres")


######################################################################
Expand Down
3 changes: 1 addition & 2 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from app import server, db

#DATABASE_URI = 'mysql+pymysql://root:passw0rd@localhost:3306/test'
DATABASE_URI = os.getenv('DATABASE_URI', "postgres://postgres:postgres@localhost:5432/postgres")
DATABASE_URI = os.getenv('DATABASE_URI', "postgresql://postgres:postgres@localhost:5432/postgres")

######################################################################
# T E S T C A S E S
Expand Down Expand Up @@ -340,7 +340,6 @@ def truncate_tables(self, session):
""" Truncates all of the tables """
meta = db.metadata
for table in reversed(meta.sorted_tables):
print 'Clear table %s' % table
session.execute(table.delete())
session.commit()

Expand Down

0 comments on commit a3c3482

Please sign in to comment.