forked from MasoniteFramework/orm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
16 additions
and
16 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
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 |
---|---|---|
|
@@ -81,7 +81,7 @@ class TestModel(unittest.TestCase): | |
def test_create_can_use_fillable(self): | ||
sql = ProfileFillable.create( | ||
{"name": "Joe", "email": "[email protected]"}, query=True | ||
) | ||
).to_sql() | ||
|
||
self.assertEqual( | ||
sql, "INSERT INTO `profiles` (`profiles`.`name`) VALUES ('Joe')" | ||
|
@@ -90,7 +90,7 @@ def test_create_can_use_fillable(self): | |
def test_create_can_use_fillable_asterisk(self): | ||
sql = ProfileFillAsterisk.create( | ||
{"name": "Joe", "email": "[email protected]"}, query=True | ||
) | ||
).to_sql() | ||
|
||
self.assertEqual( | ||
sql, | ||
|
@@ -100,7 +100,7 @@ def test_create_can_use_fillable_asterisk(self): | |
def test_create_can_use_guarded(self): | ||
sql = ProfileGuarded.create( | ||
{"name": "Joe", "email": "[email protected]"}, query=True | ||
) | ||
).to_sql() | ||
|
||
self.assertEqual( | ||
sql, "INSERT INTO `profiles` (`profiles`.`name`) VALUES ('Joe')" | ||
|
@@ -109,7 +109,7 @@ def test_create_can_use_guarded(self): | |
def test_create_can_use_guarded_asterisk(self): | ||
sql = ProfileGuardedAsterisk.create( | ||
{"name": "Joe", "email": "[email protected]"}, query=True | ||
) | ||
).to_sql() | ||
|
||
# An asterisk guarded attribute excludes all fields from mass-assignment. | ||
# This would raise a DB error if there are any required fields. | ||
|
@@ -326,7 +326,7 @@ def test_can_find_first(self): | |
def test_can_touch(self): | ||
profile = ProfileFillTimeStamped.hydrate({"name": "Joe", "id": 1}) | ||
|
||
sql = profile.touch("now", query=True) | ||
sql = profile.touch("now", query=True).to_sql() | ||
|
||
self.assertEqual( | ||
sql, | ||
|
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