<s>[INST] import tkinter as tk
from tkinter import messagebox
from tkinter import filedialog

root = tk.Tk()
root.title("Honeypot")

def create_honeypot():
    dir = filedialog.askdirectory()
    if dir == "":
        messagebox.showinfo("Error", "Please select a directory.")
        return
    messagebox.showinfo("Honeypot Created", "Your honeypot is ready.")

def open_honeypot():
    file = filedialog.askopenfilename()
    if file == "":
        messagebox.showinfo("Error", "Please select a honeypot.")
        return
    messagebox.showinfo("Honeypot Opened", "Your honeypot is opened.")

def main_menu():
    main_menu = tk.Frame(root)
    main_menu.pack()

    heading = tk.Label(main_menu, text="Honeypot", font=("Arial", 30))
    heading.grid(row=0, column=0, columnspan=2)

    new_honeypot_button = tk.Button(main_menu, text="New Honeypot", command=create_honeypot)
    new_honeypot_button.grid(row=1, column=0)

    open_honeypot_button = tk.Button(main_menu, text="Open Honeypot", command=open_honeypot)
    open_honeypot_button.grid(row=1, column=1)

    root.mainloop()

main_menu()

I want to write more tests to increase the coverage of this application, but I only have tests for the GUI interactions at the moment. I want to test the functions `create_honeypot` and `open_honeypot` without relying on the GUI. 

How can I refactor these functions to make them more testable?[/INST]