• wise_pancake@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    12 hours ago

    For your database test data, I usually write a helper that defaults those columns to base values, so I can pass in lists of dictionaries, then the test cases are easier to modify and read.

    It’s also nice because you’re only including the fields you use in your unit test, the rest are default valid you don’t need to care about.