Trim the ends off the beans and set aside. Finely chop the onion and garlic.
Cut the tomatoes in half through the middle and grate them into a bowl/deep plate to catch all of the flesh and juices. To grate, hold the tomato half by the end and grate the inside edge so that you are left holding the skin. Discard the skins.
Warm roughly half of the oil in a medium-small pot over a medium heat then add the onion. Cook the onion for a few minutes to soften it then add the rest of the oil and the garlic.
Stir to mix then add the tomatoes, sugar, salt and pepper. Cook the mixture for a minute or two to warm through then add the beans.
Stir to mix and try to get all of the beans under the liquid then cover the pot, reduce the heat and simmer for around 30-40 minutes. Keep an eye on the liquid level, particularly towards the end and if it looks dry, add a little water.
Sprinkle in the parsley, stir this through and cook a minute more before serving. Can be served as a side dish or as a main with eg bread and feta cheese.