Special equipment: a deep-frying thermometer
Bring a medium pot of water to a boil and add the sweet potatoes. Cook for 5 minutes, drain and rinse with cold water to cool. Dry off any excess water with a kitchen towel.
Put the onions and cooled sweet potatoes in the work bowl of a food processor fitted with the metal chopping blade. Pulse until the sweet potatoes are almost pureed but still a bit grainy. You should have some very small bits of potato visible. Transfer the mixture to a large bowl and stir in the flour, 1/2 teaspoon salt and 1/4 teaspoon pepper to combine.
Using your hands, shape the potato mixture into 1- to 1 1/2-inch-long cylinders, packing them very tightly.
Heat about 2 inches of oil in a deep heavy skillet over medium-high heat until a deep-frying thermometer inserted in the oil registers 350 degrees F. Line a large plate or baking sheet with paper towels.
Working in batches, add the tater tots to the shimmering hot oil and cook until golden brown, 3 to 5 minutes, turning with tongs or a slotted spoon to ensure even browning and being careful not to overcrowd the pan. With a slotted spoon or skimmer, remove the browned tots to the towel-lined plate to drain. Serve warm.