The duration for nicotine
to be detected in the tests depends on what test is being used and whether the test is for nicotine or its metabolites like cotinine. However, in most cases, tests are able to detect traces of nicotine 3-4 days after last intake. In some cases, the tests are positive even 15-20 days later. Please remember that if you postpone it till the last moment, the withdrawal symptoms
may make it difficult for you to tolerate the post-operative period, though it appears to me that you do not wish to quit smoking
completely and shall resume smoking after the surgery.