Skip to content

Commit

Permalink
feat: added migration make key nullable to fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MueezKhan246 committed Aug 27, 2024
1 parent 5ebf636 commit 38a7147
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from django.db import migrations
from integrated_channels.sap_success_factors.utils import populate_decrypted_fields_sap_success_factors


class Migration(migrations.Migration):

dependencies = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.23 on 2024-08-27 08:07

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('sap_success_factors', '0018_auto_20240826_0954'),
]

operations = [
migrations.AlterField(
model_name='sapsuccessfactorsenterprisecustomerconfiguration',
name='key',
field=models.CharField(blank=True, default='', help_text='OAuth client identifier.', max_length=255, null=True, verbose_name='Client ID'),
),
migrations.AlterField(
model_name='sapsuccessfactorsenterprisecustomerconfiguration',
name='secret',
field=models.CharField(blank=True, default='', help_text='OAuth client secret.', max_length=255, null=True, verbose_name='Client Secret'),
),
]
20 changes: 10 additions & 10 deletions tests/test_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ def setUp(self):
self.sapsf = factories.SAPSuccessFactorsEnterpriseCustomerConfigurationFactory(
enterprise_customer=self.enterprise_customer,
sapsf_base_url='http://enterprise.successfactors.com/',
key='key',
secret='secret',
decrypted_key='key',
decrypted_secret='secret',
active=True,
)
self.sapsf_global_configuration = factories.SAPSuccessFactorsGlobalConfigurationFactory()
Expand Down Expand Up @@ -255,8 +255,8 @@ def test_transmit_content_metadata_task_with_error(
dummy_sapsf = factories.SAPSuccessFactorsEnterpriseCustomerConfigurationFactory(
enterprise_customer=dummy_enterprise_customer,
sapsf_base_url='http://enterprise.successfactors.com/',
key='key',
secret='secret',
decrypted_key='key',
decrypted_secret='secret',
active=True,
)

Expand Down Expand Up @@ -436,8 +436,8 @@ def setUp(self):
self.sapsf = factories.SAPSuccessFactorsEnterpriseCustomerConfigurationFactory(
enterprise_customer=self.enterprise_customer,
sapsf_base_url='http://enterprise.successfactors.com/',
key='key',
secret='secret',
decrypted_key='key',
decrypted_secret='secret',
active=True,
)
self.sapsf_global_configuration = factories.SAPSuccessFactorsGlobalConfigurationFactory()
Expand Down Expand Up @@ -1136,8 +1136,8 @@ def setUp(self):
self.sapsf = factories.SAPSuccessFactorsEnterpriseCustomerConfigurationFactory(
enterprise_customer=self.enterprise_customer,
sapsf_base_url='http://enterprise.successfactors.com/',
key='key',
secret='secret',
decrypted_key='key',
decrypted_secret='secret',
active=True,
)
self.sapsf_global_configuration = factories.SAPSuccessFactorsGlobalConfigurationFactory(
Expand Down Expand Up @@ -1972,8 +1972,8 @@ def setUp(self):
self.customer_config = factories.SAPSuccessFactorsEnterpriseCustomerConfigurationFactory(
enterprise_customer=self.enterprise_customer,
sapsf_base_url='http://enterprise.successfactors.com/',
key='key',
secret='secret',
decrypted_key='key',
decrypted_secret='secret',
active=True,
)
self.orphaned_content = factories.ContentMetadataItemTransmissionFactory(
Expand Down

0 comments on commit 38a7147

Please sign in to comment.