-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue when configuring app and db separately
Fixes GH Issue #5
- Loading branch information
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
## Unreleased | ||
|
||
## 1.1.1 - 2020-02-29 | ||
|
||
### Added | ||
- None | ||
|
||
### Changed | ||
- None | ||
|
||
### Fixed | ||
|
||
- Issue #5: | ||
Fix issue when configuring `app` and `db` separately |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setuptools.setup( | ||
name="Flask-Seeder", | ||
version="1.1.0", | ||
version="1.1.1", | ||
url="https://github.com/diddi-/flask-seeder", | ||
author="Diddi Oskarsson", | ||
author_email="[email protected]", | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from unittest import TestCase | ||
from unittest.mock import MagicMock | ||
from flask_seeder import FlaskSeeder | ||
|
||
class TestFlaskSeeder(TestCase): | ||
|
||
def test_init_app_without_db(self): | ||
""" FlaskSeeder should use db object when passed via constructor. | ||
""" | ||
db = MagicMock() | ||
app = MagicMock() | ||
ext = {} | ||
app.extensions.__setitem__.side_effect = ext.__setitem__ | ||
seeder = FlaskSeeder(db=db) | ||
|
||
seeder.init_app(app) | ||
|
||
self.assertEqual(ext["flask_seeder"].db, db) |