Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
88 views

Generate INSERTs from function parameters with jinja2

I'm writing unit-tests with pytest for sqlite database and reporting functions and I need to arrange them by inserting minimal ...
t3chb0t's user avatar
  • 44.5k
1 vote
0 answers
58 views

UPDATE on Newspaper Bill Calculator CLI with Python (3 of 3, Database)

Code is posted after explanation. Due to the size of the project, this is being posted in three separate posts. This also ensures each post is more focused. Post 1 of 3, Core: UPDATE 1 on Newspaper ...
eccentricOrange's user avatar
3 votes
0 answers
156 views

Sending push notifications to a user

I have a function whose responsibility is to send a push notification to a user. I call this function from a view in flask framework. I have read multiple articles around refactoring and good designs ...
anekix's user avatar
  • 161
7 votes
1 answer
7k views

Python simple Class with sqlite and unit testing

I am trying to learn best practices for OOP and unit testing. I have implemented a simple User class here which checks if the user exists in the database. If yes, then it loads the user data into the ...
yanxun's user avatar
  • 173