fixture

unit testing of dynamic fixtures

Is it possible to have a fixture change between test methods? If so, how can I do this? My syntax for this problem : In the cakephp framework i am building tests for a behavior that is configured by adding fields to the table. This is intended to work in the same way that adding the "created" and "modified" fields will auto-populate...

Are there any .net equivalents to Rails fixtures?

I'm looking for a project/tool that will insert data into a database before a test and roll it back after a test has run. I know that ruby on rails has yaml fixtures, so I was hoping there is a project out there for .net projects. ...

How do you put a file in a fixture in Django?

I can easily fill the field of a FileField or ImageField in a Django fixture with a file name, but that file doesn't exist and when I try to test my application it fails because that file doesn't exist. How do I correctly populate a FileField or Imagefield in a Django fixture so that the file itself is available too? ...

How do I populate a table in rails from a fixture?

Quick summary: I have a Rails app that is a personal checklist / to-do list. Basically, you can log in and manage your to-do list. My Question: When a user creates a new account, I want to populate their checklist with 20-30 default to-do items. I know I could say: wash_the_car = ChecklistItem.new wash_the_car.name = 'Wash and wax the ...

Fixtures for Google App Engine

Hello everyone. Are there any Python tools to create fixtures on Google App Engine? I tried Fixture(http://farmdev.com/projects/fixture/). It is the most awesome tool I have come across. I love the clean approach and the consistency of the APIs. But it is LGPL licensed. Our project is licensed under Apache License 2.0 and AFAIK LGPL is i...

How do I escape ERB code in fixtures?

Hi, I have a simple fixture.yml label: body: "<%= variable %>" The issue is that the erb code is parsed as part of loading the fixture, but I actually want to body to be "<%= variable %>" un-interpolated. How do I escape this? -daniel ...

How to load sql fixture in Django for User model?

Hi folks, Does anyone knows how to load initial data for auth.User using sql fixtures? For my models, I just got have a < modelname >.sql file in a folder named sql that syncdb does it's job beautifully. But I have no clue how to do it for the auth.User model. I've googled it, but with no success. Thanks in advance, Aldo ...

Importing fixtures with foreign keys and SQLAlchemy?

I've been experimenting with using fixture to load test data sets into my Pylons / PostgreSQL app. This works great except that it fails to properly create foreign keys if they reference an auto increment id field. My fixture looks like this: class AuthorsData(DataSet): class frank_herbert: first_name = "Frank" la...

Need help with: Couldn't call Doctrine_Core::set()... symfony 1.4 fixture

I keep getting: Couldn't call Doctrine_Core::set(), second argument should be an instance of Doctrine_Collection when setting one-to-many references. This happens when I include data for 'asset' in the 'Upload' table in my fixture. See part of the schema.yml below: detect_relations: true options: collate: utf8_general_ci char...

why python nose unittest teardown fixture failed

Hi, I'm using nose test framework. When running a test module, the teardown function defined in it failed. the error raised says the fixture is locked by another process. here is my test module, test_my_module.py: ... ... def teardown(): if os.path.exists(test_output_dir): shutil.rmtree(test_output_dir) ... ... @with_s...

How to pass data stored in table between test pages in fitnesse

In my fitnesse project i've got one table which stores authentication data to database. I'm using it on each site. Is it possible to have one site with that table and allow all other test sites use data from it? how i can define global table with variables that i need? ...