Skip to content

Karantan's blog

  • Home
  • Contact
  • About me

Category: Uncategorized

Jayden StewardSeptember 5, 2016September 5, 2016

How to mock __import__ built-in function

So lets say we need to write unit test for piece of code that uses  __import__  built-in function: def task_we_want_to_test(task_name: str, task_class: str, env: dict) -> Task: module = __import__(…

Continue reading
Jayden StewardAugust 18, 2016October 7, 2016

Git branch naming convention

The naming convention, I propose, have four sections: Story Type: add == Add Feature fix == Fix, Hotfix, Bug, … clean == Cleanup, Chore, … modify  == Modify existing functionality Short Summary: 2-3…

Continue reading
Jayden StewardAugust 2, 2016September 28, 2016

Lessons learned from EuroPython 2016

This was my first EuroPython conference and I had high expectations because I heard a lot of good things about it. I must say that overall it didn’t let me…

Continue reading
Jayden StewardApril 15, 2016January 4, 2017

PostgreSQL quick examples

My cheat sheet for postgresql. Also pgcli is a really nice tool to use. IMO with it you don’t need any “phpMyAdmin” tools. Update query: UPDATE blogs SET posts=0, pages=0, plugins=0, health_score=0…

Continue reading
Jayden StewardApril 12, 2016April 15, 2016

More Python mocking: dictionary

In previous post we look at how basic mocking works and some examples. Today we will see how you can mock dict : post = { “name”: “test”, “content”: “tist”, }…

Continue reading
Jayden StewardJanuary 30, 2016January 30, 2016

Unit testing in Python with mock

Before we start writing tests let’s make sure that we understand why do we want to write unit tests and the concept of unit testing. Here are a few reasons (from my…

Continue reading
Jayden StewardJanuary 24, 2016

MongoDB not starting up

A few days ago I had a problem where mongodb crashed and I couldn’t start it up. I realized that this problem occurred because the disk was full. So I  rm…

Continue reading
Jayden StewardJanuary 21, 2016April 10, 2018

Git basics: workflow, pull request, rebasing, …

When I started using git (several years ago) I use only git command line. After a few years I decided to start using SourceTree. I regret this decision to this…

Continue reading
Jayden StewardJanuary 21, 2016January 21, 2016

Deploy website with Git bare

I tried to follow a few tutorials / howtos but non of them worked perfectly so I decided to write my own how-to. If nothing else I will know which one…

Continue reading
Jayden StewardFebruary 2, 2015January 22, 2016

Magento remove supre attribute

To remove one super product attribute (as they are called) from all configurable products, you could execute this SQL query in the database: The table catalog_product_super_attribute links products to super product attributes. You can…

Continue reading

Posts navigation

Older posts
Newer posts


Archives

Tag Cloud

conda Git Go Lessons learned logs Magento Mock Mongodb nix nixops nixos PostgreSQL Python Python3 Rsync systemd tmux Unit testing
Proudly powered by WordPress | Theme: Gently by MusterThemes.