--
Note:
If you are posting an issue,
1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/8e4c7b8a-b45c-41a7-95b7-9115f82b6dad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Prepared a quick stub.Pls feel free to contribute!
On 01-Aug-2014, at 10:05 am, Nguyen Do Le Bao <natha...@gmail.com> wrote:
Hi guys,I have seen all the unit tests written in the source code.Used to write these under GAE as well but still wondering if you guys have any quick guide to write and run those tests ?How could I use db stub ? I am still using the old https://github.com/frappe/frappe-bench, would it matter ?Thanks a lot!--
Note:
If you are posting an issue,
1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
---
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/809cd357-130d-468c-88d6-ab81da84d408%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/581ce5dd-5ddc-43de-87eb-ab2853321dac%40googlegroups.com.
Yeah, that works but the fixtures include all the data records as well. If there is no records, however, the csv file won't contain the custom field.
I am trying to set up mock data for the test, but it is really a pain cos of all the validation links... In order to add Item, I need to have Supplier -> Supplier Type ...... Is there a way to bypass the validations cos in the end that's not what I wanna test ?This is the code @@:I actually wanna clear the db after finishing testing ... but still very messy trying to find a better way to test...
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/06710966-26c1-47c2-bc03-6135152e4c7b%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.
A slightly different question: How to export an app and its db ? I can push to a git repo the code but how's about the default data ?Thanks!!
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/03198752-51eb-4327-9926-269b55d8e223%40googlegroups.com.
Traceback (most recent call last):
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/env/bin/frappe", line 9, in <module>
load_entry_point('frappe==4.1.0', 'console_scripts', 'frappe')()
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/cli.py", line 53, in main
return run(fn, parsed_args)
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/cli.py", line 83, in run
out = globals().get(fn)(**args)
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/cli.py", line 67, in new_fn
return fn(*args, **new_kwargs)
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/cli.py", line 669, in export_fixtures
export_fixtures()
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/utils/fixtures.py", line 23, in export_fixtures
for app in frappe.get_installed_apps():
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/__init__.py", line 416, in get_installed_apps
installed = json.loads(db.get_global("installed_apps") or "[]")
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/database.py", line 444, in get_global
return self.get_default(key, user)
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/database.py", line 457, in get_default
d = frappe.defaults.get_defaults(parent).get(key)
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/defaults.py", line 52, in get_defaults
userd = get_defaults_for(user)
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/defaults.py", line 140, in get_defaults_for
defaults = frappe.cache().get_value("__defaults:" + parent)
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/memc.py", line 19, in get_value
val = self.get(self.n(key))
File "/Applications/MAMP/htdocs/source_code/MyProject/new-bench/frappe-bench/apps/frappe/frappe/memc.py", line 10, in n
return (frappe.conf.db_name + ":" + key.replace(" ", "_")).encode('utf-8')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'unicode'
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/3df569d1-050d-4e30-9748-c8786e29fd3b%40googlegroups.com.