-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #339 from EBI-Metagenomics/develop
Develop
- Loading branch information
Showing
10 changed files
with
116 additions
and
93 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.18 on 2023-11-08 09:57 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('emgapi', '0011_analysisjob_analysis_summary_json'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='publication', | ||
name='pub_type', | ||
field=models.CharField(blank=True, db_column='PUB_TYPE', max_length=300, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__: str = "2.4.34" | ||
__version__: str = "2.4.35" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,42 +70,6 @@ def test_notify_not_consent(self): | |
HTTP_AUTHORIZATION='Bearer {}'.format(self.get_token()) | ||
) | ||
|
||
assert len(responses.calls) == 1 | ||
call = responses.calls[0] | ||
assert call.request.url == settings.RT["url"] | ||
assert call.request.body == json.dumps(expected_body) | ||
|
||
@responses.activate | ||
@pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher") | ||
def test_notify_consent(self): | ||
"""Test notify endpoint for consent requests | ||
""" | ||
expected_body = { | ||
"Requestor": "[email protected]", | ||
"Priority": "4", | ||
"Subject": "Test email subject", | ||
"Content": "Hi this is just an example", | ||
"Queue": settings.RT["ena_queue"], | ||
} | ||
|
||
responses.add( | ||
responses.POST, | ||
settings.RT["url"], | ||
status=200) | ||
|
||
post_data = { | ||
"from_email": "[email protected]", | ||
"subject": "Test email subject", | ||
"message": "Hi this is just an example", | ||
"is_consent": True | ||
} | ||
|
||
self.client.post( | ||
reverse('emgapi_v1:csrf-notify'), | ||
data=post_data, format='json', | ||
HTTP_AUTHORIZATION='Bearer {}'.format(self.get_token()) | ||
) | ||
|
||
assert len(responses.calls) == 1 | ||
call = responses.calls[0] | ||
assert call.request.url == settings.RT["url"] | ||
|