The Anglo-Zanzibar War is famous for being short... around forty minutes.... The English had signed a treaty with the Shah stating that his successor could only rise to power with English Support, among other things. When he died, a prince that the English didn't support declared himself Shah, seized the palace, a piece of artillery, and a couple machine guns. His soldiers barricaded the palace against the English. The RN had several ships in the harbor that the palace overlooked, shelled the Palace out of existence and sank the Zanzibar Navy... the HHS Glasgow to be exact, and the Shah promptly surrendered after forty minutes.
Now, consider if the Shah had been a sneaky bugger and not barricading the palace, but merely taking the artillery, the MGs, and the guns off the Glasgow. With those, do you think it would be possible for the RN to be forced out of the harbor? I figure artillery in protected positions and MGs covering against landing parties.... I know Zanzibar couldn't win, but it would be interesting to see a joke of a war turn slightly expensive.