default to KEY_TYPE_NORMAL to ensure backwards compatibility

also cleaned up tests around api_keys - fixed imports, reduced fixture usage
and added an additional (temporary) test for default test type
This commit is contained in:
Leo Hemsted
2016-06-24 16:10:25 +01:00
parent e9482c7fe1
commit 9eedb19fd4
3 changed files with 31 additions and 50 deletions

View File

@@ -165,7 +165,7 @@ class NotificationsStatisticsSchema(BaseSchema):
class ApiKeySchema(BaseSchema):
created_by = field_for(models.ApiKey, 'created_by', required=True)
key_type = field_for(models.ApiKey, 'key_type', required=True)
key_type = field_for(models.ApiKey, 'key_type', required=True, missing=models.KEY_TYPE_NORMAL)
class Meta:
model = models.ApiKey