RSS

Posts in 2020

  • The DAO Pattern with SQLAlchemy

    Monday, August 24, 2020 in Blog

    We learned about DAO pattern in the database chapter. The chapter contains an example using the SQLite database. The example implementation ProjectDaoSqliteImplementation uses plain SQL to access the database. But often ORMs are used to access the …

    Read more

  • Mocking two calls to open()

    Friday, August 07, 2020 in Blog

    Some days ago, a coworker asked me how he could test a function which loaded a source text file, transformed the data and then wrote it back to target file. The function looked something like this: def convert_file(source_path, target_path): with …

    Read more