Enhance tests
This commit is contained in:
parent
f0b9ab4256
commit
3ebb3e1acf
@ -15,7 +15,7 @@ from app.models import (
|
||||
def test_notecolours_get_colour(session):
|
||||
"""Create a colour record and retrieve all colours"""
|
||||
|
||||
note_colour = "#abcdef"
|
||||
note_colour = "#0bcdef"
|
||||
NoteColours(session, substring="substring", colour=note_colour)
|
||||
|
||||
records = NoteColours.get_all(session)
|
||||
@ -27,8 +27,8 @@ def test_notecolours_get_colour(session):
|
||||
def test_notecolours_get_all(session):
|
||||
"""Create two colour records and retrieve them all"""
|
||||
|
||||
note1_colour = "#abcdef"
|
||||
note2_colour = "#00ff00"
|
||||
note1_colour = "#1bcdef"
|
||||
note2_colour = "#20ff00"
|
||||
NoteColours(session, substring="note1", colour=note1_colour)
|
||||
NoteColours(session, substring="note2", colour=note2_colour)
|
||||
|
||||
@ -39,7 +39,7 @@ def test_notecolours_get_all(session):
|
||||
|
||||
|
||||
def test_notecolours_get_colour_none(session):
|
||||
note_colour = "#abcdef"
|
||||
note_colour = "#3bcdef"
|
||||
NoteColours(session, substring="substring", colour=note_colour)
|
||||
|
||||
result = NoteColours.get_colour(session, "xyz")
|
||||
@ -47,7 +47,7 @@ def test_notecolours_get_colour_none(session):
|
||||
|
||||
|
||||
def test_notecolours_get_colour_match(session):
|
||||
note_colour = "#abcdef"
|
||||
note_colour = "#4bcdef"
|
||||
nc = NoteColours(session, substring="sub", colour=note_colour)
|
||||
assert nc
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user