JSON Parse error

Hi,
My Py code

@frappe.whitelist()
def make_test(source_name):
test = frappe.new_doc(“Todo”)
test.description = “test”
test.save()
return test

my Js Code

        frm.add_custom_button(__("Make Test"), function() {
            frappe.call({
     method: 'erpnext.custom.make_test',
     args: {
         "source_name": frm.doc.name
     },
     callback: function(r) {
           var doclist = frappe.model.sync(r.message);
             msgprint(doclist[0].name);

     },
});

    });

Error I get in console
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
frappe.request.call/<()
desk.min.js:1449
n.Callbacks/i()
jquery.min.js:2
n.Callbacks/j.fireWith()
jquery.min.js:2
z()
jquery.min.js:4
.send/c/<()

I am not sure what is wrong. anyone?

JS console usually shows the line number where the error was thrown. Click on the line number and check where did the problem occur. Post the screenshot here for further help.

No need to write the js code against the current python code.
try this:
@frappe.whitelist()
def make_test(source_name):
test = frappe.new_doc(“Todo”)
test.description = “test”
test.save()
frappe.db.commit()
print test
return test

@netchampfaris

There is a POST error too before tht.

You are calling a method that do not exists. check url.

Try using method: 'erpnext.erpnext.custom.make_test'