TT#7029 Clear test data more accurate in some collections

Change-Id: If645b91099eadd2c4f85ca63983c9f70fd92bfdf
changes/03/9803/13
Irina Peshinskaya 10 years ago
parent f7be40f0c9
commit 264e42f24d

@ -49,6 +49,7 @@ $test_machine->check_get2put();
$test_machine->check_bundle();
$test_machine->clear_test_data_all();
undef $test_machine;
undef $fake_data;
done_testing;
# vim: set tabstop=4 expandtab:

@ -97,9 +97,11 @@ foreach my $api (@apis){
(undef, $preferences_put->{content}) = $test_machine->request_put($preferences_old,$preferences->{uri});
}
$test_machine->clear_test_data_all();
undef $fake_data;
undef $test_machine;
done_testing;
#----------------- aux
sub get_preference_existen_value{
my $preference = shift;

@ -52,7 +52,7 @@ $fake_data->set_data_from_script({
'create_special'=> sub {
my ($self,$collection_name,$test_machine) = @_;
my $pilot = $test_machine->get_item_hal('subscribers','/api/subscribers/?customer_id='.$self->data->{$collection_name}->{data}->{customer_id}.'&'.'is_pbx_pilot=1');
if($pilot->{content}->{total_count} <= 0){
if($pilot->{total_count} <= 0){
undef $pilot;
}
$test_machine->check_create_correct(1, sub{$_[0]->{is_pbx_pilot} = ($pilot || $_[1]->{i} > 1)? 0 : 1;} );
@ -242,7 +242,11 @@ if($remote_config->{config}->{features}->{cloudpbx}){
$test_machine->clear_test_data_all();#fake data aren't registered in this test machine, so they will stay.
}
}
$fake_data->clear_test_data_all();
$test_machine->clear_test_data_all();#fake data aren't registered in this test machine, so they will stay.
$fake_data->clear_test_data_all();
undef $test_machine;
undef $fake_data;
done_testing;
sub number_as_string{

Loading…
Cancel
Save